Linker fails to adjust segment memory size for SHT_NOBITS sections whose VMA > the page size:
[EMAIL PROTECTED] phdr-3]$ cat foo.s .globl _entry .section .foo,"awx",%progbits _entry: .byte 0 .section .bar,"ax",%nobits .byte 0 [EMAIL PROTECTED] phdr-3]$ cat foo.lds ENTRY(_entry) PHDRS { data PT_LOAD; } SECTIONS { . = 0x1000000; .foo : { *(.foo) } :data . = 0x2000000; .bar : { *(.bar) } :data /DISCARD/ : { *(*) } } [EMAIL PROTECTED] phdr-3]$ make as -o foo.o foo.s /usr/bin/ld -o foo -T foo.lds foo.o readelf -l foo Elf file type is EXEC (Executable file) Entry point 0x1000000 There are 1 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align LOAD 0x0000000000200000 0x0000000001000000 0x0000000001000000 0x0000000000000001 0x0000000000200001 RWE 200000 Section to Segment mapping: Segment Sections... 00 .foo [EMAIL PROTECTED] phdr-3]$ .bar is in the segment. This patch: http://sourceware.org/ml/binutils/2007-03/msg00018.html seems to work. -- Summary: Liinker fails to handle SHT_NOBITS section whose VMA > page size Product: binutils Version: 2.18 (HEAD) Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: hjl at lucon dot org CC: amodra at bigpond dot net dot au,bug-binutils at gnu dot org http://sourceware.org/bugzilla/show_bug.cgi?id=4144 ------- 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