https://sourceware.org/bugzilla/show_bug.cgi?id=30237
--- Comment #7 from Fangrui Song <i at maskray dot me> --- (In reply to Andreas Schwab from comment #6) > Since arm32 does not have PT_ARM_ATTRIBUTES it cannot have this problem in > the first place. With the PHDRS linker script command, we can customize program headers and drop the PT_RISCV_ATTRIBUTES program header even with newer linkers that add PT_RISCV_ATTRIBUTES. At any rate, whether a non-SHF_ALLOC section like SHT_RISCV_ATTRIBUTES is covered by a PT_LOAD should not cause objcopy/strip to behave abnormally. A non-SHF_ALLOC section like SHT_RISCV_ATTRIBUTES is not commonly covered by a PT_* program header. The SHT_RISCV_ATTRIBUTES is not that different from .comment from a strip tool's viewpoint. I don't think .comment not covered by a program header allows the strip tool to behave abnormally. > If you think this program is trivial, then why does it > have .riscv.attributes? Even for the trivial program, there is some information like Attribute Section: riscv File Attributes Tag_RISCV_stack_align: 16-bytes Tag_RISCV_arch: "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0_zmmul1p0" I am concerned that RISC-V folks may add more not-so-useful attributes in the future, but this is unrelated to this bug report. -- You are receiving this mail because: You are on the CC list for the bug.