This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
3 gold testcases...
- From: David Miller <davem at davemloft dot net>
- To: binutils at sourceware dot org
- Date: Tue, 08 Apr 2008 15:41:21 -0700 (PDT)
- Subject: 3 gold testcases...
I'm now down to three testcase failures with my sparc
32-bit target on gold.
I've analyzed each one, and they really aren't sparc target
bugs per-se, but rather testcases that need some tweaks of
some sort:
1) justsyms puts a string at 0x10000 hoping that will be
out of the way and not in some mapped region of the
executable image so that it will generate a segfault.
This happens to be where the .text gets mapped so the
segfault doesn't happen and the testcase fails.
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
...
LOAD 0x000000 0x00010000 0x00010000 0x0086c 0x0086c R E 0x2000
...
Symbol table '.symtab' contains 53 entries:
Num: Value Size Type Bind Vis Ndx Name
...
52: 00010000 16 OBJECT GLOBAL DEFAULT ABS justsyms_string
2) script_test_2 fails because of the assertion:
assert(reinterpret_cast<uintptr_t>(start_test_area_1 + 48 + 7 + 4)
== reinterpret_cast<uintptr_t>(start_data));
It assumes that the string will only consume 7 bytes, but on
Sparc strings are emitted by the compiler with an ".align 8"
directive, and thus the size consumed by the string is rounded
up to 8 bytes.
3) script_test_3 fails because the PT_LOAD segments created overlap
within a page, and the kernel thus refuses to load the binary.
Actually, if I run the program as:
bash$ /lib/ld-linux.so.2 ./script_test_3
it works, so I suppose the PT_LOAD mapping rules of the dynamic
linker are more relaxed than that of the kernel.
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .interp PROGBITS 10000000 010000 000013 00 A 0 0 1
...
[14] .text PROGBITS 100004e0 0104e0 000b48 00 AX 0 0 32
[15] .text PROGBITS 10001028 011028 0002a8 00 AX 0 0 4
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
INTERP 0x010000 0x10000000 0x10000000 0x004c8 0x004c8 R 0x8
[Requesting program interpreter: /lib/ld-linux.so.2]
LOAD 0x000000 0x0fff0000 0x0fff0000 0x11398 0x11398 R E 0x2000
LOAD 0x011400 0x10101400 0x10101400 0x001e0 0x001e0 RWE 0x2000
LOAD 0x011600 0x10201600 0x10201600 0x00000 0x00088 RW 0x2000
DYNAMIC 0x011400 0x10101400 0x10101400 0x000d0 0x000d0 R 0x4