Summary: | executable is incorrectly marked as ELFOSABI_GNU | ||
---|---|---|---|
Product: | binutils | Reporter: | H.J. Lu <hjl.tools> |
Component: | ld | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 2.36 | ||
Target Milestone: | 2.36 | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
H.J. Lu
2020-12-17 14:09:48 UTC
SHF_GNU_RETAIN is in the OS-specific range, the marking is required to properly recognize it. (In reply to Andreas Schwab from comment #1) > SHF_GNU_RETAIN is in the OS-specific range, the marking is required to > properly recognize it. SHF_GNU_RETAIN does nothing on shared object and executable. Linker doesn't even mark it on shared object and executable. That is irrelevant. Without the marking the bit has no defined meaning. The master branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=04f8967487515179cc6dfc7c828f77eeb75c08d3 commit 04f8967487515179cc6dfc7c828f77eeb75c08d3 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Dec 18 04:24:26 2020 -0800 elf: Copy elf_gnu_osabi_retain only for relocatable link Copy elf_gnu_osabi_retain from input only for relocatable link since SHF_GNU_RETAIN has no impact on non-relocatable outputs. bfd/ PR ld/27091 * elflink.c (elf_link_input_bfd): Copy elf_gnu_osabi_retain from input only for relocatable link. ld/ PR ld/27091 * testsuite/ld-elf/retain7.s: New file. * testsuite/ld-elf/retain7a.d: Likewise. * testsuite/ld-elf/retain7b.d: Likewise. Fixed. |