[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/27490] New: gold: Don't produce two output sections __llvm_prf
From: |
i at maskray dot me |
Subject: |
[Bug gold/27490] New: gold: Don't produce two output sections __llvm_prf_names |
Date: |
Mon, 01 Mar 2021 00:49:12 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=27490
Bug ID: 27490
Summary: gold: Don't produce two output sections
__llvm_prf_names
Product: binutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gold
Assignee: ccoutant at gmail dot com
Reporter: i at maskray dot me
CC: ian at airs dot com
Target Milestone: ---
LLVM integrated assembler does not set EI_OSABI in the ELF header to
ELFOSABI_GNU for SHF_GNU_RETAIN usage. (LLVM does not have the "emulation"
concept. In a FreeBSD environment, arguably ELFOSABI_FREEBSD is better. For
other OSABI systems, perhaps other values should be used. Anycase, the
ELFOSABI_NONE choice is consistent with integrated assembler's handling with
STT_GNU_IFUNC/STB_GNU_UNIQUE.)
cat > ./a.s <<eof
.section __llvm_prf_names,"a",@progbits
.quad 0
eof
echo '.section __llvm_prf_names,"aR",@progbits' > ./b.s
clang -c a.s b.s # clang >= 12.0.0
# a.o b.o are ELFOSABI_NONE
~/Dev/binutils-gdb/Debug/gold/ld-new a.o b.o
There are two __llvm_prf_names output sections. GNU ld produces just one.
llvm-cov show errors if there are two __llvm_prf_names sections.
% readelf -WS a.out
There are 8 section headers, starting at offset 0x168:
Section Headers:
[Nr] Name Type Address Off Size ES Flg
Lk Inf Al
[ 0] NULL 0000000000000000 000000 000000 00
0 0 0
[ 1] .text PROGBITS 0000000000400078 000078 000000 00 AX
0 0 4
[ 2] __llvm_prf_names PROGBITS 0000000000400078 000078 000008 00 A
0 0 1
[ 3] __llvm_prf_names PROGBITS 0000000000400080 000080 000000 00 Ao
0 0 1
[ 4] .note.gnu.gold-version NOTE 0000000000000000 000080 00001c 00
0 0 4
[ 5] .symtab SYMTAB 0000000000000000 0000a0 000060 18
6 1 8
[ 6] .strtab STRTAB 0000000000000000 000100 000019 00
0 0 1
[ 7] .shstrtab STRTAB 0000000000000000 000119 000049 00
0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
L (link order), O (extra OS processing required), G (group), T (TLS),
C (compressed), x (unknown), o (OS specific), E (exclude),
l (large), p (processor specific)
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug gold/27490] New: gold: Don't produce two output sections __llvm_prf_names,
i at maskray dot me <=