[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/4090] New: Can't use ADDR on section after
From: |
hjl at lucon dot org |
Subject: |
[Bug ld/4090] New: Can't use ADDR on section after |
Date: |
22 Feb 2007 10:29:06 -0000 |
address@hidden lma-4]$ /usr/bin/ld -V
GNU ld version 2.15.92.0.2 20040927
Supported emulations:
elf_i386
i386linux
address@hidden lma-4]$ cat foo.t
SECTIONS
{
.bar : AT ((ADDR(.foo) + 4095) & ~(4095)) { *(.bar) }
.foo : { *(.foo) }
/DISCARD/ : { *(.*) }
}
address@hidden lma-4]$ cat foo.s
.section .bar,"ax","progbits"
.byte 0
.section .foo,"aw","progbits"
.byte 0
address@hidden lma-4]$ ld -V
GNU ld version 2.17.50.0.13 20070212
Supported emulations:
elf_i386
i386linux
address@hidden lma-4]$ make LD=ld
ld -m elf_i386 -o foo -T foo.t foo.o
foo.t:7 nonconstant expression for load base
make: *** [foo] Error 1
address@hidden lma-4]$ make LD=/usr/bin/ld
/usr/bin/ld -m elf_i386 -o foo -T foo.t foo.o
readelf -S -l --wide foo
There are 6 section headers, starting at offset 0x2028:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .bar PROGBITS 00000000 002000 000001 00 AX 0 0 1
[ 2] .foo PROGBITS 00000001 001001 000001 00 WA 0 0 1
[ 3] .shstrtab STRTAB 00000000 002001 000025 00 0 0 1
[ 4] .symtab SYMTAB 00000000 002118 000060 10 5 6 4
[ 5] .strtab STRTAB 00000000 002178 000001 00 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings)
I (info), L (link order), G (group), 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 2 program headers, starting at offset 52
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x001001 0x00000001 0x00000001 0x00001 0x00001 RW 0x1000
LOAD 0x002000 0x00000000 0x00001000 0x00001 0x00001 R E 0x1000
Section to Segment mapping:
Segment Sections...
00 .foo
01 .bar
address@hidden lma-4]$
--
Summary: Can't use ADDR on section after
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: bug-binutils at gnu dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=4090
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug ld/4090] New: Can't use ADDR on section after,
hjl at lucon dot org <=