https://sourceware.org/bugzilla/show_bug.cgi?id=21593
Bug ID: 21593
Summary: .startof.SECNAME and .sizeof.SECNAME should be local
Product: binutils
Version: 2.29 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
[hjl@gnu-tools-1 startof]$ cat x.s
.section scnfoo,"aw",%progbits
.zero 0x10
.globl bar
.data
.align 8
.type bar, %object
.size bar, 8
bar:
.dc.a __stop_scnfoo
.dc.a .sizeof. (scnfoo)
.dc.a __start_scnfoo
.dc.a .startof. (scnfoo)
[hjl@gnu-tools-1 startof]$ make
as -o x.o x.s
./ld -shared --gc-sections -o x.so x.o
readelf -sW x.so | grep scnfoo
1: 0000000000201020 0 NOTYPE GLOBAL DEFAULT 8 .startof.scnfoo
6: 0000000000000010 0 NOTYPE GLOBAL DEFAULT ABS .sizeof.scnfoo
10: 0000000000201030 0 NOTYPE LOCAL DEFAULT 8 __stop_scnfoo
11: 0000000000201020 0 NOTYPE LOCAL DEFAULT 8 __start_scnfoo
13: 0000000000201020 0 NOTYPE GLOBAL DEFAULT 8 .startof.scnfoo
18: 0000000000000010 0 NOTYPE GLOBAL DEFAULT ABS .sizeof.scnfoo
[hjl@gnu-tools-1 startof]$
Exporting .startof.SECNAME and .sizeof.SECNAME as dynamic symbols may
lead to unexpected behavior. Reference to .startof.SECNAME and
.sizeof.SECNAME to section SECNAME within a DSO will be resolved to
.startof.SECNAME and .sizeof.SECNAME in another DSO or executable.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils