[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/32014] RISC-V: -flto causes .riscv.attributes section to ignore
From: |
cvs-commit at gcc dot gnu.org |
Subject: |
[Bug ld/32014] RISC-V: -flto causes .riscv.attributes section to ignore specified extensions |
Date: |
Fri, 09 Aug 2024 03:14:03 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=32014
--- Comment #1 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nelson Chu <nelsonc1225@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=04c9cf0a8c5f03e5a1bb91a954cc42eb83a3e493
commit 04c9cf0a8c5f03e5a1bb91a954cc42eb83a3e493
Author: Nelson Chu <nelson@rivosinc.com>
Date: Wed Jul 31 13:00:11 2024 +0800
RISC-V: PR32014, .option directives shuoldn't affect elf attribute.
The .option arch/rvc/norvc/push/pop directives can only take effect for a
small/large specific code region, so they are not file-level architecture
setting. They should only affect the mapping symbols only rather than the
file-level elf architecture attribute. Otherwise, the elf architecture
attribute will appear to missing some extensions when -flto merges files
with different .option architecture settings.
gas/
PR 32014
* config/tc-riscv.c (file_arch_str): New const char *, rather than
the
arch_str in the riscv_rps_as.subset_list, it's file-level so only
be
affected by .attribute arch directive.
(riscv_reset_subsets_list_arch_str): Renamed to riscv_set_arch_str,
and
also can handle both file_arch_str and arch_str in subset_list,
just
give the pointer address as the input.
(riscv_set_arch): Called by -march and .attribute arch, so set both
file_arch_str and arch_str in subset_list.
(s_riscv_option): Updated .option arch/rvc/norvc/push/pop that only
set the arch_str in subset_list.
(riscv_write_out_attrs): Output elf architecture attribute
according to
file_arch_str. Freed file_arch_str.
* doc/c-riscv.texi: Added destrbution that .option directives
shouldn't
affect the elf attribute settings.
* testsuite/gas/riscv/option-arch.s: From option-arch-01/02/03
merged.
* testsuite/gas/riscv/option-arch-dis.d: Likewise, for
dis-assembler.
* testsuite/gas/riscv/option-arch-attr.d: Likewise, to check
readelf -A.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/32014] RISC-V: -flto causes .riscv.attributes section to ignore specified extensions,
cvs-commit at gcc dot gnu.org <=