[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/3290] "ld -s" leaves absolute symbol in DSO
From: |
hjl at lucon dot org |
Subject: |
[Bug ld/3290] "ld -s" leaves absolute symbol in DSO |
Date: |
29 Sep 2006 23:33:09 -0000 |
------- Additional Comments From hjl at lucon dot org 2006-09-29 23:33 -------
strip is even worse. When .debug_info section is removed, we leave
5: 000000000000008d 0 NOTYPE GLOBAL DEFAULT 12 DW.z.h.f1c9b137.0
section index is wrong.
address@hidden dwarf-7]$ make STRIP=strip libb.so
gcc -g -feliminate-dwarf2-dups -fPIC -c -o c.o c.c
./ld -shared -o libb-g.so c.o
strip -g libb-g.so -o libb.so
address@hidden dwarf-7]$ readelf -sS libb.so
There are 13 section headers, starting at offset 0x420:
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .hash HASH 0000000000000120 00000120
000000000000003c 0000000000000004 A 2 0 8
[ 2] .dynsym DYNSYM 0000000000000160 00000160
00000000000000f0 0000000000000018 A 3 4 8
[ 3] .dynstr STRTAB 0000000000000250 00000250
0000000000000038 0000000000000000 A 0 0 1
[ 4] .text PROGBITS 0000000000000288 00000288
0000000000000006 0000000000000000 AX 0 0 4
[ 5] .eh_frame PROGBITS 0000000000000290 00000290
0000000000000038 0000000000000000 A 0 0 8
[ 6] .dynamic DYNAMIC 00000000002002c8 000002c8
00000000000000b0 0000000000000010 WA 3 0 8
[ 7] .got.plt PROGBITS 0000000000200378 00000378
0000000000000018 0000000000000008 WA 0 0 8
[ 8] .bss NOBITS 0000000000200390 00000390
0000000000000008 0000000000000000 WA 0 0 4
[ 9] .comment PROGBITS 0000000000000000 00000390
000000000000002d 0000000000000000 0 0 1
[10] .shstrtab STRTAB 0000000000000000 000003bd
0000000000000061 0000000000000000 0 0 1
[11] .symtab SYMTAB 0000000000000000 00000760
0000000000000198 0000000000000018 12 12 8
[12] .strtab STRTAB 0000000000000000 000008f8
0000000000000045 0000000000000000 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings)
I (info), L (link order), G (group), x (unknown)
O (extra OS processing required) o (OS specific), p (processor specific)
Symbol table '.dynsym' contains 10 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000288 0 SECTION LOCAL DEFAULT 4
2: 0000000000000290 0 SECTION LOCAL DEFAULT 5
3: 0000000000200390 0 SECTION LOCAL DEFAULT 8
4: 0000000000000288 6 FUNC GLOBAL DEFAULT 4 doprintf
5: 000000000000008d 0 NOTYPE GLOBAL DEFAULT 12 DW.z.h.f1c9b137.0
6: 0000000000200390 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
7: 0000000000200390 4 OBJECT GLOBAL DEFAULT 8 foo
8: 0000000000200390 0 NOTYPE GLOBAL DEFAULT ABS _edata
9: 0000000000200398 0 NOTYPE GLOBAL DEFAULT ABS _end
Symbol table '.symtab' contains 17 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000000002002c8 0 OBJECT LOCAL HIDDEN ABS _DYNAMIC
2: 0000000000200378 0 OBJECT LOCAL HIDDEN ABS _GLOBAL_OFFSET_TABLE_
3: 0000000000000120 0 SECTION LOCAL DEFAULT 1
4: 0000000000000160 0 SECTION LOCAL DEFAULT 2
5: 0000000000000250 0 SECTION LOCAL DEFAULT 3
6: 0000000000000288 0 SECTION LOCAL DEFAULT 4
7: 0000000000000290 0 SECTION LOCAL DEFAULT 5
8: 00000000002002c8 0 SECTION LOCAL DEFAULT 6
9: 0000000000200378 0 SECTION LOCAL DEFAULT 7
10: 0000000000200390 0 SECTION LOCAL DEFAULT 8
11: 0000000000000000 0 SECTION LOCAL DEFAULT 9
12: 0000000000000288 6 FUNC GLOBAL DEFAULT 4 doprintf
13: 0000000000200390 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
14: 0000000000200390 4 OBJECT GLOBAL DEFAULT 8 foo
15: 0000000000200390 0 NOTYPE GLOBAL DEFAULT ABS _edata
16: 0000000000200398 0 NOTYPE GLOBAL DEFAULT ABS _end
address@hidden dwarf-7]$
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3290
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug ld/3290] New: "ld -s" leaves absolute symbol in DSO, hjl at lucon dot org, 2006/09/29
- [Bug ld/3290] "ld -s" leaves absolute symbol in DSO, hjl at lucon dot org, 2006/09/29
- [Bug ld/3290] "ld -s" leaves absolute symbol in DSO, pluto at agmk dot net, 2006/09/29
- [Bug ld/3290] "ld -s" leaves absolute symbol in DSO, hjl at lucon dot org, 2006/09/29
- [Bug ld/3290] "ld -s" leaves absolute symbol in DSO,
hjl at lucon dot org <=
- [Bug ld/3290] "ld -s" leaves absolute symbol in DSO, hjl at lucon dot org, 2006/09/29
- [Bug ld/3290] "ld -s" leaves absolute symbol in DSO, hjl at lucon dot org, 2006/09/29