[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/22728] New: Incorrect local symbols generated on Solaris
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/22728] New: Incorrect local symbols generated on Solaris |
Date: |
Thu, 18 Jan 2018 16:51:54 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=22728
Bug ID: 22728
Summary: Incorrect local symbols generated on Solaris
Product: binutils
Version: 2.31 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
Target: *-*-solaris
emulparams/solaris2.sh has
# The Solaris 2 ABI requires that two local symbols are present in every
# executable and shared object.
# Cf. Linker and Libraries Guide, Ch. 2, Link-Editor, Generating the Output
# File, p.63.
TEXT_START_SYMBOLS='_START_ = .;'
OTHER_END_SYMBOLS='_END_ = .;'
But ld generates:
address@hidden ld]$ cat 1
../gas/as-new
-I/export/gnu/import/git/sources/binutils-gdb/ld/testsuite/ld-elf -o
tmpdir/comm-data1.o
/export/gnu/import/git/sources/binutils-gdb/ld/testsuite/ld-elf/comm-data1.s
./ld-new -o tmpdir/libcomm-data.so -z norelro
-L/export/gnu/import/git/sources/binutils-gdb/ld/testsuite/ld-elf -shared
tmpdir/comm-data1.o
/export/build/gnu/binutils-cross/build-x86_64-solaris2.12/ld/../binutils/readelf
-s tmpdir/libcomm-data.so
address@hidden ld]$ sh 1
Symbol table '.dynsym' contains 10 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000200288 0 OBJECT GLOBAL DEFAULT 7 _DYNAMIC
2: 0000000000000280 0 OBJECT GLOBAL DEFAULT 4
_PROCEDURE_LINKAGE_TABLE_
3: 0000000000200338 0 OBJECT LOCAL DEFAULT 8 _END_
readelf: Warning: local symbol 3 found at index >= .dynsym's sh_info value of 1
4: 0000000000000280 0 OBJECT LOCAL DEFAULT 4 _START_
readelf: Warning: local symbol 4 found at index >= .dynsym's sh_info value of 1
5: 0000000000200338 0 NOTYPE GLOBAL DEFAULT 8 __bss_start
6: 0000000000000280 0 OBJECT GLOBAL DEFAULT 5 foo
7: 0000000000200338 0 NOTYPE GLOBAL DEFAULT 8 _edata
8: 0000000000200338 0 OBJECT GLOBAL DEFAULT 8
_GLOBAL_OFFSET_TABLE_
9: 0000000000200338 0 NOTYPE GLOBAL DEFAULT 8 _end
Symbol table '.symtab' contains 18 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000000000000e8 0 SECTION LOCAL DEFAULT 1
2: 0000000000000128 0 SECTION LOCAL DEFAULT 2
3: 0000000000000218 0 SECTION LOCAL DEFAULT 3
4: 0000000000000280 0 SECTION LOCAL DEFAULT 4
5: 0000000000000280 0 SECTION LOCAL DEFAULT 5
6: 0000000000000288 0 SECTION LOCAL DEFAULT 6
7: 0000000000200288 0 SECTION LOCAL DEFAULT 7
8: 0000000000200338 0 SECTION LOCAL DEFAULT 8
9: 0000000000200338 0 OBJECT LOCAL DEFAULT 8 _END_
10: 0000000000000280 0 OBJECT LOCAL DEFAULT 4 _START_
11: 0000000000200288 0 OBJECT GLOBAL DEFAULT 7 _DYNAMIC
12: 0000000000000280 0 OBJECT GLOBAL DEFAULT 4
_PROCEDURE_LINKAGE_TABLE_
13: 0000000000200338 0 NOTYPE GLOBAL DEFAULT 8 __bss_start
14: 0000000000000280 0 OBJECT GLOBAL DEFAULT 5 foo
15: 0000000000200338 0 NOTYPE GLOBAL DEFAULT 8 _edata
16: 0000000000200338 0 OBJECT GLOBAL DEFAULT 8
_GLOBAL_OFFSET_TABLE_
17: 0000000000200338 0 NOTYPE GLOBAL DEFAULT 8 _end
address@hidden ld]$
Local symbols, _START_ and _END, are placed after global symbols
in .dynsym.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/22728] New: Incorrect local symbols generated on Solaris,
hjl.tools at gmail dot com <=