send2vinnie / mclinker

Automatically exported from code.google.com/p/mclinker
Other
0 stars 0 forks source link

No compressed debug section support #128

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
[hjl@gnu-6 compressed-1]$ cat lib.c
int bar1 = 200;
int bar2 = 300;

int
foo ()
{
  return bar2 / bar1;
}

void *
foo_p ()
{
  return foo;
}
[hjl@gnu-6 compressed-1]$ make libfoo.so
gcc -c -O2 -m32 -g -fPIC -o lib.o lib.c
objcopy --compress-debug-sections lib.o
./ld.mcld -march=x86 -filetype=dso -o libfoo.so lib.o
make: *** [libfoo.so] Segmentation fault
[hjl@gnu-6 compressed-1]$ readelf -S lib.o
There are 24 section headers, starting at offset 0x3e4:

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .group            GROUP           00000000 000034 000008 04     22  23  4
  [ 2] .group            GROUP           00000000 00003c 000008 04     22  18  4
  [ 3] .text             PROGBITS        00000000 000050 000042 00  AX  0   0 16
  [ 4] .rel.text         REL             00000000 000984 000038 08     22   3  4
  [ 5] .data             PROGBITS        00000000 000094 000008 00  WA  0   0  4
  [ 6] .bss              NOBITS          00000000 00009c 000000 00  WA  0   0  4
  [ 7] .text.__x86.get_p PROGBITS        00000000 00009c 000004 00 AXG  0   0  1
  [ 8] .text.__x86.get_p PROGBITS        00000000 0000a0 000004 00 AXG  0   0  1
  [ 9] .zdebug_info      PROGBITS        00000000 0000a4 00005c 00      0   0  1
  [10] .rel.zdebug_info  REL             00000000 0009bc 000080 08     22   9  4
  [11] .zdebug_abbrev    PROGBITS        00000000 000100 000060 00      0   0  1
  [12] .zdebug_aranges   PROGBITS        00000000 000160 000022 00      0   0  1
  [13] .rel.zdebug_arang REL             00000000 000a3c 000010 08     22  12  4
  [14] .zdebug_line      PROGBITS        00000000 000182 00003f 00      0   0  1
  [15] .rel.zdebug_line  REL             00000000 000a4c 000008 08     22  14  4
  [16] .zdebug_str       PROGBITS        00000000 0001c1 00009d 01  MS  0   0  1
  [17] .comment          PROGBITS        00000000 00025e 00002d 01  MS  0   0  1
  [18] .note.GNU-stack   PROGBITS        00000000 00028b 000000 00      0   0  1
  [19] .eh_frame         PROGBITS        00000000 00028c 000070 00   A  0   0  4
  [20] .rel.eh_frame     REL             00000000 000a54 000020 08     22  19  4
  [21] .shstrtab         STRTAB          00000000 0002fc 0000e7 00      0   0  1
  [22] .symtab           SYMTAB          00000000 0007a4 000180 10     23  17  4
  [23] .strtab           STRTAB          00000000 000924 00005d 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)
[hjl@gnu-6 compressed-1]$ 

Original issue reported on code.google.com by hjl.to...@gmail.com on 22 Feb 2013 at 5:49