bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/9945] New: strip --strip-unneeded removes symbol table


From: hjl dot tools at gmail dot com
Subject: [Bug binutils/9945] New: strip --strip-unneeded removes symbol table
Date: 12 Mar 2009 18:46:05 -0000

address@hidden testsuite]$ cat x.s
        .arch armv4
        .text
        bx      lr
address@hidden testsuite]$ ../as-new  -meabi=4 --fix-v4bx -o x.o x.s   
address@hidden testsuite]$ readelf -S x.o
There are 9 section headers, starting at offset 0x94:

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .text             PROGBITS        00000000 000034 000004 00  AX  0   0  1
  [ 2] .rel.text         REL             00000000 000260 000008 08      7   1  4
  [ 3] .data             PROGBITS        00000000 000038 000000 00  WA  0   0  1
  [ 4] .bss              NOBITS          00000000 000038 000000 00  WA  0   0  1
  [ 5] .ARM.attributes   ARM_ATTRIBUTES  00000000 000038 000019 00      0   0  1
  [ 6] .shstrtab         STRTAB          00000000 000051 000040 00      0   0  1
  [ 7] .symtab           SYMTAB          00000000 0001fc 000060 10      8   6  4
  [ 8] .strtab           STRTAB          00000000 00025c 000004 00      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)
address@hidden testsuite]$  ../../binutils/strip-new --strip-unneeded x.o -o b.o
address@hidden testsuite]$ readelf -S b.o
There are 7 section headers, starting at offset 0x84:

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .text             PROGBITS        00000000 000034 000004 00  AX  0   0  1
  [ 2] .rel.text         REL             00000000 00019c 000008 08      0   1  4
  [ 3] .data             PROGBITS        00000000 000038 000000 00  WA  0   0  1
  [ 4] .bss              NOBITS          00000000 000038 000000 00  WA  0   0  1
  [ 5] .ARM.attributes   ARM_ATTRIBUTES  00000000 000038 000019 00      0   0  1
  [ 6] .shstrtab         STRTAB          00000000 000051 000030 00      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)
address@hidden testsuite]$ readelf -r b.o

Relocation section '.rel.text' at offset 0x19c contains 1 entries:
 Offset     Info    Type            Sym.Value  Sym. Name
00000000  00000028 R_ARM_V4BX       
address@hidden testsuite]$ 

Symbol table is needed for R_ARM_V4BX, which references the first
entry of symbol table.

-- 
           Summary: strip --strip-unneeded removes symbol table
           Product: binutils
           Version: 2.20 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: hjl dot tools at gmail dot com
                CC: bug-binutils at gnu dot org
GCC target triplet: arm-eabi


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

------- 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]