Message ID | 20211230030201.842664-1-jiawei@iscas.ac.cn |
---|---|
State | Deferred, archived |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DE5723857C66 for <patchwork@sourceware.org>; Thu, 30 Dec 2021 03:02:56 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from cstnet.cn (smtp21.cstnet.cn [159.226.251.21]) by sourceware.org (Postfix) with ESMTP id 204C6385800A for <gcc-patches@gcc.gnu.org>; Thu, 30 Dec 2021 03:02:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 204C6385800A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=iscas.ac.cn Received: from localhost.localdomain (unknown [47.107.228.42]) by APP-01 (Coremail) with SMTP id qwCowADX3JxKIc1hu86DBQ--.60355S2; Thu, 30 Dec 2021 11:02:35 +0800 (CST) From: jiawei <jiawei@iscas.ac.cn> To: gcc-patches@gcc.gnu.org Subject: [PATCH] Testsuite: Add btf-dataset option for RISC-V. Date: Thu, 30 Dec 2021 11:02:01 +0800 Message-Id: <20211230030201.842664-1-jiawei@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: qwCowADX3JxKIc1hu86DBQ--.60355S2 X-Coremail-Antispam: 1UD129KBjvJXoW7Xr17AFy7AFy3Cr17XF4rAFb_yoW8JF1xp3 y8XrWxtrWrJFn7WF48AFy8W3Waga9rGFZxu3s2vrWjk343Jr9aqFn5KrW3Cr1fJa1F9a1a 9w40v3y7Zw1DtrUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvl14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26ryj6F1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j 6F4UM28EF7xvwVC2z280aVAFwI0_Cr1j6rxdM28EF7xvwVC2z280aVCY1x0267AKxVWxJr 0_GcWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lFIxGxcIEc7CjxVA2 Y2ka0xkIwI1lc2xSY4AK67A8MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r 4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF 67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2I x0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_WFyUJVCq3wCI42IY 6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvj DU0xZFpf9x0JU8rcfUUUUU= X-Originating-IP: [47.107.228.42] X-CM-SenderInfo: 5mld4v3l6l2u1dvotugofq/1tbiBgcLAF0Tf4W4-QAAs7 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Cc: sinan@isrc.iscas.ac.cn, jiawei <jiawei@iscas.ac.cn>, indu.bhagat@oracle.com, kito.cheng@sifive.com, yulong@nj.iscas.ac.cn, shihua@iscas.ac.cn Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
Testsuite: Add btf-dataset option for RISC-V.
|
|
Commit Message
Jiawei
Dec. 30, 2021, 3:02 a.m. UTC
Add -msmall-data-limit option to put global and static data into right section and generate 'btt_info' on RISC-V target. BTF (BPF Type Format) is the metadata format which encodes the debug info related to BPF program/map, more details on: https://www.kernel.org/doc/html/latest/bpf/index.html#bpf-type-format-btf gcc/testsuite/ChangeLog: * gcc.dg/debug/btf/btf-datasec-1.c: Add riscv target support. --- gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c | 1 + 1 file changed, 1 insertion(+)
Comments
On 12/29/2021 8:02 PM, jiawei wrote: > Add -msmall-data-limit option to put global and static data into right > section and generate 'btt_info' on RISC-V target. > > BTF (BPF Type Format) is the metadata format which encodes the debug info related to BPF program/map, more details on: > https://www.kernel.org/doc/html/latest/bpf/index.html#bpf-type-format-btf > > gcc/testsuite/ChangeLog: > > * gcc.dg/debug/btf/btf-datasec-1.c: Add riscv target support. Is the goal here to get the variable "d" out of the small data section and into the standard data section? It's not clear from your description . Neither an ACK nor a NAK at this point. I need to understand better what you're trying to accomplish. jeff
On Thu, 30 Dec 2021 08:28:34 PST (-0800), gcc-patches@gcc.gnu.org wrote: > > > On 12/29/2021 8:02 PM, jiawei wrote: >> Add -msmall-data-limit option to put global and static data into right >> section and generate 'btt_info' on RISC-V target. >> >> BTF (BPF Type Format) is the metadata format which encodes the debug info related to BPF program/map, more details on: >> https://www.kernel.org/doc/html/latest/bpf/index.html#bpf-type-format-btf >> >> gcc/testsuite/ChangeLog: >> >> * gcc.dg/debug/btf/btf-datasec-1.c: Add riscv target support. > Is the goal here to get the variable "d" out of the small data section > and into the standard data section? It's not clear from your description . > > Neither an ACK nor a NAK at this point. I need to understand better > what you're trying to accomplish. IIUC that's what this is doing, though the commit message isn't clear at all. That saind, it might be better to do something like diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c index dbb236bbda1..c0ad77d40aa 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c @@ -22,9 +22,9 @@ /* { dg-final { scan-assembler-times "0\[\t \]+\[^\n\]*bts_offset" 7 } } */ /* Check that strings for each DATASEC have been added to the BTF string table. */ -/* { dg-final { scan-assembler-times "ascii \".data.0\"\[\t \]+\[^\n\]*btf_aux_string" 1 } } */ -/* { dg-final { scan-assembler-times "ascii \".rodata.0\"\[\t \]+\[^\n\]*btf_aux_string" 1 } } */ -/* { dg-final { scan-assembler-times "ascii \".bss.0\"\[\t \]+\[^\n\]*btf_aux_string" 1 } } */ +/* { dg-final { scan-assembler-times "ascii \".[s]?data.0\"\[\t \]+\[^\n\]*btf_aux_string" 1 } } */ +/* { dg-final { scan-assembler-times "ascii \".[s]?rodata.0\"\[\t \]+\[^\n\]*btf_aux_string" 1 } } */ +/* { dg-final { scan-assembler-times "ascii \".[s]?bss.0\"\[\t \]+\[^\n\]*btf_aux_string" 1 } } */ int a; long long b; as whether specific symbols end up in .data or .sdata is really just an optimization and either should be sufficiently correct. IIRC some targets have other flavors of these, PPC's .sdata2 comes to mind. Not sure if we'd need that to drop their -msdata=none flag.
> -----原始邮件----- > 发件人: "Palmer Dabbelt" <palmer@rivosinc.com> > 发送时间: 2021-12-31 00:59:08 (星期五) > 收件人: jeffreyalaw@gmail.com > 抄送: gcc-patches@gcc.gnu.org, jiawei@iscas.ac.cn, gcc-patches@gcc.gnu.org, indu.bhagat@oracle.com, kito.cheng@sifive.com, yulong@nj.iscas.ac.cn, sinan@isrc.iscas.ac.cn, shihua@iscas.ac.cn > 主题: Re: [PATCH] Testsuite: Add btf-dataset option for RISC-V. > > On Thu, 30 Dec 2021 08:28:34 PST (-0800), gcc-patches@gcc.gnu.org wrote: > > > > > > On 12/29/2021 8:02 PM, jiawei wrote: > >> Add -msmall-data-limit option to put global and static data into right > >> section and generate 'btt_info' on RISC-V target. > >> > >> BTF (BPF Type Format) is the metadata format which encodes the debug info related to BPF program/map, more details on: > >> https://www.kernel.org/doc/html/latest/bpf/index.html#bpf-type-format-btf > >> > >> gcc/testsuite/ChangeLog: > >> > >> * gcc.dg/debug/btf/btf-datasec-1.c: Add riscv target support. > > Is the goal here to get the variable "d" out of the small data section > > and into the standard data section? It's not clear from your description . > > > > Neither an ACK nor a NAK at this point. I need to understand better > > what you're trying to accomplish. Thanks for your mentions, the testcase said it expect 3 DATASEC records: one for each of .data, .rodata and .bss. If we only use /* { dg-options "-O0 -gbtf -dA" } */ as default compile option on riscv target like: ``````````````````` $ riscv64-unknown-elf-gcc -S -O0 -gbtf -dA btf-datasec-1.c ``````````````````` the variable in section will be throw into .sdata, .sbss, .srodata and don't fit the check require, and I add the additional option '-msmall-data-limit' to fix it, to get a correct .section part, we need to limit the '-msmall-data-limit' less than the smallest variable 'int a' size define as 4 byte, then it will be send into section .bss. ``````````````````` $ riscv64-unknown-elf-gcc -S -O0 -gbtf -dA btf-datasec-1.c -o btf-datasec-1.s .Ltext0: .cfi_sections .debug_frame .file 0 "/root/test" "btf-datasec-1.c" .globl a .section .sbss,"aw",@nobits .align 2 .type a, @object .size a, 4 $ riscv64-unknown-elf-gcc -S -O0 -gbtf -dA -msmall-data-limit=2 btf-datasec-1.c -o btf-datasec-2.s .Ltext0: .cfi_sections .debug_frame .file 0 "/root/test" "btf-datasec-1.c" .globl a .bss .align 2 .type a, @object .size a, 4 ``````````````````` It is seem on other variable, and when all section set right, all check in the testcase can pass on riscv. ``````````````````` $ diff btf-datasec-1.s btf-datasec-2.s > .bss 144c163 < .section .srodata,"a" --- > .section .rodata 151c170 < .section .sdata,"aw" --- > .data 158c177 < .section .srodata --- > .section .rodata ``````````````````` > > IIUC that's what this is doing, though the commit message isn't clear at > all. That saind, it might be better to do something like Sorry for the unclear commit, I explained the idea in this mail, should I resend the patch? > > diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c > index dbb236bbda1..c0ad77d40aa 100644 > --- a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c > +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c > @@ -22,9 +22,9 @@ > /* { dg-final { scan-assembler-times "0\[\t \]+\[^\n\]*bts_offset" 7 } } */ > > /* Check that strings for each DATASEC have been added to the BTF string table. */ > -/* { dg-final { scan-assembler-times "ascii \".data.0\"\[\t \]+\[^\n\]*btf_aux_string" 1 } } */ > -/* { dg-final { scan-assembler-times "ascii \".rodata.0\"\[\t \]+\[^\n\]*btf_aux_string" 1 } } */ > -/* { dg-final { scan-assembler-times "ascii \".bss.0\"\[\t \]+\[^\n\]*btf_aux_string" 1 } } */ > +/* { dg-final { scan-assembler-times "ascii \".[s]?data.0\"\[\t \]+\[^\n\]*btf_aux_string" 1 } } */ > +/* { dg-final { scan-assembler-times "ascii \".[s]?rodata.0\"\[\t \]+\[^\n\]*btf_aux_string" 1 } } */ > +/* { dg-final { scan-assembler-times "ascii \".[s]?bss.0\"\[\t \]+\[^\n\]*btf_aux_string" 1 } } */ > > int a; > long long b; > > as whether specific symbols end up in .data or .sdata is really just an > optimization and either should be sufficiently correct. > Yes, I think you are quite right, this is a question that the symbol goes different section after optimization. > IIRC some targets have other flavors of these, PPC's .sdata2 comes to > mind. Not sure if we'd need that to drop their -msdata=none flag. I'm not familiar with other target, maybe there are some error parts with my understanding, Thanks at all! </palmer@rivosinc.com>
On 12/30/21 8:59 AM, Palmer Dabbelt wrote: > On Thu, 30 Dec 2021 08:28:34 PST (-0800), gcc-patches@gcc.gnu.org wrote: >> >> >> On 12/29/2021 8:02 PM, jiawei wrote: >>> Add -msmall-data-limit option to put global and static data into right >>> section and generate 'btt_info' on RISC-V target. >>> >>> BTF (BPF Type Format) is the metadata format which encodes the debug >>> info related to BPF program/map, more details on: >>> https://www.kernel.org/doc/html/latest/bpf/index.html#bpf-type-format-btf >>> >>> >>> gcc/testsuite/ChangeLog: >>> >>> * gcc.dg/debug/btf/btf-datasec-1.c: Add riscv target support. >> Is the goal here to get the variable "d" out of the small data section >> and into the standard data section? It's not clear from your >> description . >> >> Neither an ACK nor a NAK at this point. I need to understand better >> what you're trying to accomplish. > > IIUC that's what this is doing, though the commit message isn't clear at > all. That saind, it might be better to do something like > > diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c > b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c > index dbb236bbda1..c0ad77d40aa 100644 > --- a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c > +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c > @@ -22,9 +22,9 @@ > /* { dg-final { scan-assembler-times "0\[\t \]+\[^\n\]*bts_offset" > 7 } } */ > /* Check that strings for each DATASEC have been added to the BTF > string table. */ > -/* { dg-final { scan-assembler-times "ascii \".data.0\"\[\t > \]+\[^\n\]*btf_aux_string" 1 } } */ > -/* { dg-final { scan-assembler-times "ascii \".rodata.0\"\[\t > \]+\[^\n\]*btf_aux_string" 1 } } */ > -/* { dg-final { scan-assembler-times "ascii \".bss.0\"\[\t > \]+\[^\n\]*btf_aux_string" 1 } } */ > +/* { dg-final { scan-assembler-times "ascii \".[s]?data.0\"\[\t > \]+\[^\n\]*btf_aux_string" 1 } } */ > +/* { dg-final { scan-assembler-times "ascii \".[s]?rodata.0\"\[\t > \]+\[^\n\]*btf_aux_string" 1 } } */ > +/* { dg-final { scan-assembler-times "ascii \".[s]?bss.0\"\[\t > \]+\[^\n\]*btf_aux_string" 1 } } */ > int a; > long long b; > > as whether specific symbols end up in .data or .sdata is really just an > optimization and either should be sufficiently correct. Yes, I would agree that the test case can be adapted as mentioned. The purpose of the test case is to check that BTF is correctly generated for whatever section the symbols end up in. Adding David Faust in CC for ACK. Thanks Indu > > IIRC some targets have other flavors of these, PPC's .sdata2 comes to > mind. Not sure if we'd need that to drop their -msdata=none flag.
On 12/30/2021 9:59 AM, Palmer Dabbelt wrote: > On Thu, 30 Dec 2021 08:28:34 PST (-0800), gcc-patches@gcc.gnu.org wrote: >> >> >> On 12/29/2021 8:02 PM, jiawei wrote: >>> Add -msmall-data-limit option to put global and static data into right >>> section and generate 'btt_info' on RISC-V target. >>> >>> BTF (BPF Type Format) is the metadata format which encodes the debug >>> info related to BPF program/map, more details on: >>> https://www.kernel.org/doc/html/latest/bpf/index.html#bpf-type-format-btf >>> >>> >>> gcc/testsuite/ChangeLog: >>> >>> * gcc.dg/debug/btf/btf-datasec-1.c: Add riscv target support. >> Is the goal here to get the variable "d" out of the small data section >> and into the standard data section? It's not clear from your >> description . >> >> Neither an ACK nor a NAK at this point. I need to understand better >> what you're trying to accomplish. > > IIUC that's what this is doing, though the commit message isn't clear > at all. That saind, it might be better to do something like It might. My only real hesitation would be if where was some wonky BTF dependency on having the symbols in the normal sections. But I'd consider that unlikey. > > diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c > b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c > index dbb236bbda1..c0ad77d40aa 100644 > --- a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c > +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c > @@ -22,9 +22,9 @@ > /* { dg-final { scan-assembler-times "0\[\t \]+\[^\n\]*bts_offset" > 7 } } */ > /* Check that strings for each DATASEC have been added to the > BTF string table. */ > -/* { dg-final { scan-assembler-times "ascii \".data.0\"\[\t > \]+\[^\n\]*btf_aux_string" 1 } } */ > -/* { dg-final { scan-assembler-times "ascii \".rodata.0\"\[\t > \]+\[^\n\]*btf_aux_string" 1 } } */ > -/* { dg-final { scan-assembler-times "ascii \".bss.0\"\[\t > \]+\[^\n\]*btf_aux_string" 1 } } */ > +/* { dg-final { scan-assembler-times "ascii \".[s]?data.0\"\[\t > \]+\[^\n\]*btf_aux_string" 1 } } */ > +/* { dg-final { scan-assembler-times "ascii \".[s]?rodata.0\"\[\t > \]+\[^\n\]*btf_aux_string" 1 } } */ > +/* { dg-final { scan-assembler-times "ascii \".[s]?bss.0\"\[\t > \]+\[^\n\]*btf_aux_string" 1 } } */ > int a; > long long b; > > as whether specific symbols end up in .data or .sdata is really just > an optimization and either should be sufficiently correct. Probably missing some escapes in your variant (the brackets). Jiawei, could you try Palmer suggestion to verify it works for you? > > IIRC some targets have other flavors of these, PPC's .sdata2 comes to > mind. Not sure if we'd need that to drop their -msdata=none flag. I'd expect them to continue to work as-is. We could potentially drop those flags as a separate patch after suitable testing. jeff
On 1/3/22 08:43, Indu Bhagat wrote: > On 12/30/21 8:59 AM, Palmer Dabbelt wrote: >> On Thu, 30 Dec 2021 08:28:34 PST (-0800), gcc-patches@gcc.gnu.org wrote: >>> >>> >>> On 12/29/2021 8:02 PM, jiawei wrote: >>>> Add -msmall-data-limit option to put global and static data into right >>>> section and generate 'btt_info' on RISC-V target. >>>> >>>> BTF (BPF Type Format) is the metadata format which encodes the debug >>>> info related to BPF program/map, more details on: >>>> https://www.kernel.org/doc/html/latest/bpf/index.html#bpf-type-format-btf >>>> >>>> >>>> gcc/testsuite/ChangeLog: >>>> >>>> * gcc.dg/debug/btf/btf-datasec-1.c: Add riscv target support. >>> Is the goal here to get the variable "d" out of the small data section >>> and into the standard data section? It's not clear from your >>> description . >>> >>> Neither an ACK nor a NAK at this point. I need to understand better >>> what you're trying to accomplish. >> >> IIUC that's what this is doing, though the commit message isn't clear at >> all. That saind, it might be better to do something like >> >> diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c >> b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c >> index dbb236bbda1..c0ad77d40aa 100644 >> --- a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c >> +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c >> @@ -22,9 +22,9 @@ >> /* { dg-final { scan-assembler-times "0\[\t \]+\[^\n\]*bts_offset" >> 7 } } */ >> /* Check that strings for each DATASEC have been added to the BTF >> string table. */ >> -/* { dg-final { scan-assembler-times "ascii \".data.0\"\[\t >> \]+\[^\n\]*btf_aux_string" 1 } } */ >> -/* { dg-final { scan-assembler-times "ascii \".rodata.0\"\[\t >> \]+\[^\n\]*btf_aux_string" 1 } } */ >> -/* { dg-final { scan-assembler-times "ascii \".bss.0\"\[\t >> \]+\[^\n\]*btf_aux_string" 1 } } */ >> +/* { dg-final { scan-assembler-times "ascii \".[s]?data.0\"\[\t >> \]+\[^\n\]*btf_aux_string" 1 } } */ >> +/* { dg-final { scan-assembler-times "ascii \".[s]?rodata.0\"\[\t >> \]+\[^\n\]*btf_aux_string" 1 } } */ >> +/* { dg-final { scan-assembler-times "ascii \".[s]?bss.0\"\[\t >> \]+\[^\n\]*btf_aux_string" 1 } } */ >> int a; >> long long b; >> >> as whether specific symbols end up in .data or .sdata is really just an >> optimization and either should be sufficiently correct. > > Yes, I would agree that the test case can be adapted as mentioned. The > purpose of the test case is to check that BTF is correctly generated for > whatever section the symbols end up in. > > Adding David Faust in CC for ACK. Thanks Indu I concur. This looks like a good improvement to me. If any of the existing target-specific options in the test could eventually be dropped as a result, then all the better IMO. David > > Thanks > Indu > >> >> IIRC some targets have other flavors of these, PPC's .sdata2 comes to >> mind. Not sure if we'd need that to drop their -msdata=none flag. >
diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c index dbb236bbda1..d54c8b1f63b 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c @@ -13,6 +13,7 @@ /* { dg-options "-O0 -gbtf -dA" } */ /* { dg-options "-O0 -gbtf -dA -msdata=none" { target { { powerpc*-*-* } && ilp32 } } } */ /* { dg-options "-O0 -gbtf -dA -G0" { target { nios2-*-* } } } */ +/* { dg-options "-O0 -gbtf -dA -msmall-data-limit=2" { target { riscv*-*-* } } } */ /* Check for two DATASEC entries with vlen 3, and one with vlen 1. */ /* { dg-final { scan-assembler-times "0xf000003\[\t \]+\[^\n\]*btt_info" 2 } } */