DragonFly bugs List (threaded) for 2009-10
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: [issue1525] boehm-gc problems
There's a difference between DragonFly's ld and FreeBSD's ld.
Let's take the following program:
extern void *vodka;
void *
f(void)
{
return vodka;
}
We compile it into a shared library:
%cc -c -o vodka.o vodka.c
%ld -Bshareable -o libvodka.so vodka.o
Then we do:
%objdump -t libvodka.so
Doing the above steps on DragonFly produces:
libvodka.so: file format elf32-i386
SYMBOL TABLE:
00000094 l d .hash 00000000 .hash
000000c4 l d .dynsym 00000000 .dynsym
00000134 l d .dynstr 00000000 .dynstr
00000158 l d .rel.dyn 00000000 .rel.dyn
00000160 l d .text 00000000 .text
0000116c l d .dynamic 00000000 .dynamic
000011e4 l d .got.plt 00000000 .got.plt
00000000 l d .comment 00000000 .comment
00000000 l d *ABS* 00000000 .shstrtab
00000000 l d *ABS* 00000000 .symtab
00000000 l d *ABS* 00000000 .strtab
00000000 l df *ABS* 00000000 vodka.c
0000116c l O *ABS* 00000000 .hidden _DYNAMIC
000011e4 l O *ABS* 00000000 .hidden _GLOBAL_OFFSET_TABLE_
00000160 g F .text 0000000a f
00000000 *UND* 00000000 vodka
000011f0 g *ABS* 00000000 __bss_start
000011f0 g *ABS* 00000000 _edata
000011f0 g *ABS* 00000000 _end
Doing the steps on FreeBSD produces:
libvodka.so: file format elf32-i386-freebsd
SYMBOL TABLE:
00000094 l d .hash 00000000
00000128 l d .dynsym 00000000
00000248 l d .dynstr 00000000
00000288 l d .rel.dyn 00000000
00000290 l d .text 00000000
0000129c l d .data 00000000
0000129c l d .dynamic 00000000
00001314 l d .got 00000000
00001320 l d .bss 00000000
00000000 l d .comment 00000000
00000000 l d *ABS* 00000000
00000000 l d *ABS* 00000000
00000000 l d *ABS* 00000000
00000000 l df *ABS* 00000000 vodka.c
0000129c g O *ABS* 00000000 _DYNAMIC
00000290 g F .text 0000000a f
00000000 *UND* 00000000 vodka
00001320 g *ABS* 00000000 __bss_start
00001320 g *ABS* 00000000 _edata
00001314 g O *ABS* 00000000 _GLOBAL_OFFSET_TABLE_
00001320 g *ABS* 00000000 _end
Please, note that '_DYNAMIC' is a local symbol on DragonFly and a global
one on FreeBSD.
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]