[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/4144] New: Liinker fails to handle SHT_NOBITS section whose VMA
From: |
hjl at lucon dot org |
Subject: |
[Bug ld/4144] New: Liinker fails to handle SHT_NOBITS section whose VMA > page size |
Date: |
6 Mar 2007 19:43:35 -0000 |
Linker fails to adjust segment memory size for SHT_NOBITS sections whose VMA
> the page size:
address@hidden phdr-3]$ cat foo.s
.globl _entry
.section .foo,"awx",%progbits
_entry:
.byte 0
.section .bar,"ax",%nobits
.byte 0
address@hidden phdr-3]$ cat foo.lds
ENTRY(_entry)
PHDRS
{
data PT_LOAD;
}
SECTIONS
{
. = 0x1000000;
.foo : { *(.foo) } :data
. = 0x2000000;
.bar : { *(.bar) } :data
/DISCARD/ : { *(*) }
}
address@hidden 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
address@hidden 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 ld/4144] New: Liinker fails to handle SHT_NOBITS section whose VMA > page size,
hjl at lucon dot org <=