bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/2723] ld puts unused section symbols in symbol table


From: hjl at lucon dot org
Subject: [Bug ld/2723] ld puts unused section symbols in symbol table
Date: 1 Jun 2006 16:51:37 -0000

------- Additional Comments From hjl at lucon dot org  2006-06-01 16:51 -------
Created an attachment (id=1061)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1061&action=view)
A testcase

I got

address@hidden symtab-1]$ make
as   -o foo.o foo.s
./ld -o foo foo.o
./objcopy foo bar
readelf -Ss foo > foo.l
readelf -Ss bar > bar.l
diff -up foo.l bar.l
--- foo.l       2006-06-01 09:50:12.000000000 -0700
+++ bar.l       2006-06-01 09:50:12.000000000 -0700
@@ -12,26 +12,23 @@ Section Headers:
   [ 3] .shstrtab         STRTAB           0000000000000000  000000b5
        0000000000000027  0000000000000000           0     0     1
   [ 4] .symtab           SYMTAB           0000000000000000  00000260
-       0000000000000138  0000000000000018           5     6     8
-  [ 5] .strtab           STRTAB           0000000000000000  00000398
+       00000000000000f0  0000000000000018           5     3     8
+  [ 5] .strtab           STRTAB           0000000000000000  00000350
        0000000000000033  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 '.symtab' contains 13 entries:
+Symbol table '.symtab' contains 10 entries:
    Num:    Value          Size Type    Bind   Vis      Ndx Name
      0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
      1: 00000000004000b0     0 SECTION LOCAL  DEFAULT    1
      2: 00000000006000b4     0 SECTION LOCAL  DEFAULT    2
-     3: 0000000000000000     0 SECTION LOCAL  DEFAULT    3
-     4: 0000000000000000     0 SECTION LOCAL  DEFAULT    4
-     5: 0000000000000000     0 SECTION LOCAL  DEFAULT    5
-     6: 00000000004000b0     0 NOTYPE  GLOBAL DEFAULT    1 __start
-     7: 00000000004000b0     0 NOTYPE  GLOBAL DEFAULT    1 _start
-     8: 00000000006000b5     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start
-     9: 00000000004000b0     0 NOTYPE  GLOBAL DEFAULT    1 main
-    10: 00000000006000b5     0 NOTYPE  GLOBAL DEFAULT  ABS _edata
-    11: 00000000006000b8     0 NOTYPE  GLOBAL DEFAULT  ABS _end
-    12: 00000000004000b0     0 NOTYPE  GLOBAL DEFAULT    1 start
+     3: 00000000004000b0     0 NOTYPE  GLOBAL DEFAULT    1 __start
+     4: 00000000004000b0     0 NOTYPE  GLOBAL DEFAULT    1 _start
+     5: 00000000006000b5     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start
+     6: 00000000004000b0     0 NOTYPE  GLOBAL DEFAULT    1 main
+     7: 00000000006000b5     0 NOTYPE  GLOBAL DEFAULT  ABS _edata
+     8: 00000000006000b8     0 NOTYPE  GLOBAL DEFAULT  ABS _end
+     9: 00000000004000b0     0 NOTYPE  GLOBAL DEFAULT    1 start
make: *** [all] Error 1
address@hidden symtab-1]$

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2723

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]