Linking to the elf32-i386 format using the following linker script gives me an error "non constant expression for load base".
Changing the OUTPUT_FORMAT to binary however makes the script work fine. Here is the linker script used. OUTPUT_FORMAT("elf32-i386") ENTRY(start) FourKB = 0x1000; physical = 0x100000; /* 1 meg */ virtual = 0xC0000000; /* 3 gig */ SECTIONS { . = physical; .setup : { *(.setup) } . += virtual; .text : AT( ADDR(.text) - virtual ) { *(.text) *(.rodata*) } . = ALIGN(FourKB); .data : AT( LOADADDR(.text) + SIZEOF(.text) ) { start_ctors = .; *(.ctors*) end_ctors = .; start_dtors = .; *(.dtors) end_dtors = .; *(.data) } . = ALIGN(FourKB); .bss : AT( LOADADDR(.data) + SIZEOF(.data) ) { *(.bss) *(COMMON) } . = ALIGN(FourKB); } -- Summary: Linking to elf32-i386 causing error "non constant expression for load base" Product: binutils Version: 2.16 Status: NEW Severity: normal Priority: P2 Component: binutils AssignedTo: unassigned at sources dot redhat dot com ReportedBy: architect dot matrix at gmail dot com CC: bug-binutils at gnu dot org http://sourceware.org/bugzilla/show_bug.cgi?id=2706 ------- 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