Test results of memory_test.sh depends on versions of GCC. On Linux/x86, GCC 4.2 and GCC 4.3 failed with
[...@gnu-6 testsuite]$ cat memory_test.sh.log FAIL: memory_test.sh (exit: 1) ============================== pattern " LOAD 0x00203c 0x0*00004000 0x0*0000603c 0x0000\?2a 0x0000\?2a R E 0x1000" not found in file memory_test.stdout. [...@gnu-6 testsuite]$ cat memory_test.stdout There are 13 section headers, starting at offset 0x20e8: Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .sec0 PROGBITS 00000000 001000 000002 00 A 0 0 1 [ 2] .sec1 PROGBITS 00001000 00112c 000002 00 A 0 0 1 [ 3] .sec3 PROGBITS 00005000 002000 000002 00 A 0 0 1 [ 4] .sec2 PROGBITS 00004000 00203c 000002 00 A 0 0 1 [ 5] .text PROGBITS 00004004 002040 000000 00 AX 0 0 4 [ 6] .sec4 PROGBITS 00004004 002040 000002 00 A 0 0 1 [ 7] .data PROGBITS 00004008 002044 000000 00 WA 0 0 4 [ 8] .bss NOBITS 00004008 002044 000000 00 WA 0 0 4 [ 9] .note.gnu.gold-version NOTE 00000000 002044 00001c 00 0 0 4 [10] .symtab SYMTAB 00000000 002060 000020 10 11 1 4 [11] .strtab STRTAB 00000000 002080 000006 00 0 0 1 [12] .shstrtab STRTAB 00000000 002086 000061 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) Elf file type is EXEC (Executable file) Entry point 0x0 There are 5 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x001000 0x00000000 0x00000000 0x00002 0x00002 R 0x1000 LOAD 0x00112c 0x00001000 0x0000012c 0x00002 0x00002 R 0x1000 LOAD 0x002000 0x00005000 0x00005000 0x00002 0x00002 R 0x1000 LOAD 0x00203c 0x00004000 0x0000603c 0x00006 0x00006 R E 0x1000 LOAD 0x002044 0x00004008 0x00006044 0x00000 0x00000 RW 0x1000 Section to Segment mapping: Segment Sections... 00 .sec0 01 .sec1 02 .sec3 03 .sec2 .text .sec4 04 .data .bss [...@gnu-6 testsuite]$ The same input generates different results with ld: [...@gnu-6 tmp]$ ld -m elf_i386 -T /export/gnu/import/git/binutils/gold/testsuite/memory_test.t memory_test.o -z max-page-size=0x1000 ld: a.out: section .sec1 lma 0x12c adjusted to 0x12c [...@gnu-6 tmp]$ readelf -Sl a.out There are 9 section headers, starting at offset 0x403c: Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .sec0 PROGBITS 00002000 002000 000002 00 A 0 0 1 [ 2] .sec1 PROGBITS 00001000 001000 000002 00 A 0 0 1 [ 3] .sec2 PROGBITS 00004000 004000 000002 00 A 0 0 1 [ 4] .sec3 PROGBITS 00005000 003000 000002 00 A 0 0 1 [ 5] .sec4 PROGBITS 00002002 002002 000002 00 A 0 0 1 [ 6] .shstrtab STRTAB 00000000 004002 000039 00 0 0 1 [ 7] .symtab SYMTAB 00000000 0041a4 000070 10 8 6 4 [ 8] .strtab STRTAB 00000000 004214 000006 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) Elf file type is EXEC (Executable file) Entry point 0x2000 There are 4 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x000000 0x00000000 0xfffff12c 0x01002 0x01002 R 0x1000 LOAD 0x002000 0x00002000 0x00002000 0x00004 0x00004 R 0x1000 LOAD 0x003000 0x00005000 0x0000412c 0x00002 0x00002 R 0x1000 LOAD 0x004000 0x00004000 0x0000603c 0x00002 0x00002 R 0x1000 Section to Segment mapping: Segment Sections... 00 .sec1 01 .sec0 .sec4 02 .sec3 03 .sec2 [...@gnu-6 tmp]$ -- Summary: Different behevior of MEMORY regions Product: binutils Version: 2.21 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold AssignedTo: ian at airs dot com ReportedBy: hjl dot tools at gmail dot com CC: bug-binutils at gnu dot org http://sourceware.org/bugzilla/show_bug.cgi?id=11997 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils