[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/27282] New: ld: Should SHF_GNU_RETAIN/STT_GNU_IFUNC/STB_GNU_UNIQ
From: |
i at maskray dot me |
Subject: |
[Bug ld/27282] New: ld: Should SHF_GNU_RETAIN/STT_GNU_IFUNC/STB_GNU_UNIQUE work for ELFOSABI_NONE object files? |
Date: |
Sat, 30 Jan 2021 04:37:10 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=27282
Bug ID: 27282
Summary: ld: Should SHF_GNU_RETAIN/STT_GNU_IFUNC/STB_GNU_UNIQUE
work for ELFOSABI_NONE object files?
Product: binutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: i at maskray dot me
Target Milestone: ---
ld -m elf_x86_64 recognizes semantics of OS-specific
STT_GNU_IFUNC/STB_GNU_UNIQUE in ELFOSABI_NONE object files.
LLVM integrated assembler as of 12.0.0 does not set ELFOSABI_GNU if you use
@gnu_indirect_function/@gnu_unique_object.
Question: how do GNU as set OSABI for STT_GNU_IFUNC/STB_GNU_UNIQUE on
FreeBSD? Is the behavior host platform dependent?
However, ld -m elf_x86_64 does not recognize SHF_GNU_RETAIN in ELFOSABI_NONE
object files.
So these section/symbol properties have some inconsistency.
I can see two choices.
1. (Current behavior)
Ignore semantics of SHF_GNU_RETAIN in ELFOSABI_NONE object files.
If we want to make rules consistent, we should do this for
STT_GNU_IFUNC/STB_GNU_UNIQUE,
but it would break all the object files produced by LLVM integrated assembler.
2.
Recognize the semantics of SHF_GNU_RETAIN if the ld configuration & options
indicate Linux target (e.g. ld -m elf_x86_64 on Linux),
regardless of EI_OSABI in object files.
This choice gives discretion to the linker.
I think the only downside is that readelf -S does not display 'R' for
SHF_GNU_RETAIN,
like readelf -s doesn't show IFUNC for LLVM integrated assembler assembled
object files today.
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug ld/27282] New: ld: Should SHF_GNU_RETAIN/STT_GNU_IFUNC/STB_GNU_UNIQUE work for ELFOSABI_NONE object files?,
i at maskray dot me <=