Comment 1 by Evan Lojewski, Nov 2, 2012
This issue is due to the spacing between __TEXT and __DATA currently being hardcoded in teh variable ${DATA_PAD}. This value needs to be calculated at compile time. For a temporary fix, you can increase the size of DATA_PAD in the boot2 Makefile.
Labels:
Priority:High
Maintainability
Priority:Medium
Status: Accepted
Summary: Compile Error - ${DATA_PAD} is not calculated
Owner: meklort
Status: Accepted
Summary: Compile Error - ${DATA_PAD} is not calculated
Owner: meklort
Comment 2 by Konstantinos Giannakas, Nov 4, 2012
Thanks Evan, original value in file i386/boot2/Makefile was DATA_PAD = 3582 and it only passes this error with random higher value of e.g. 3584 (don't even know what a proper value is) but I still can't compile. Produces another error: ================= Making all in boot2 ================= [CC] /Volumes/Workbench/Programming/assembla/chameleon/sym/i386/boot_modul es.c [LD] boot.sys [dyldsymboltool] Symbols.dylib [LD] boot.sys ld: warning: -segaddr __INIT not page aligned, rounding down ld: warning: -segaddr __TEXT not page aligned, rounding down ld: image too large: address can't fit in 31-bit r_address field in boot2 from /chameleon/obj/i386/boot2/boot2.o collect2: ld returned 1 exit status make[3]: *** [boot] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Any idea? Thanks again.
Comment 3 by Konstantinos Giannakas, Nov 13, 2012
Hello meklort and chameleon team. Just updated all files to revision svn2118 and did a clean recompilation, but still fails to compile. Any ideas? The trick to change the value in ${DATA_PAD} did not work... Still running 10.6.8 and gcc version 4.2.1 (Apple Inc. build 5666) (dot 3). Thanks. ================= Making all in boot2 ================= [MKDIR] /Volumes/Workbench/Programming/assembla/chameleon/obj/i386/boot2 [AS] boot2.s [CC] boot.c [CC] graphics.c [CC] drivers.c [CC] prompt.c [CC] options.c [CC] lzss.c [CC] mboot.c [CC] ramdisk.c [CC] picopng.c [CC] resume.c [CC] bmdecompress.c [CC] graphic_utils.c [CC] gui.c [CC] modules.c [AS] modules_support.s [CC] /Volumes/Workbench/Programming/assembla/chameleon/sym/i386/boot_modul es.c [LD] boot.sys [dyldsymboltool] Symbols.dylib [LD] boot.sys ld: warning: -segaddr __INIT not page aligned, rounding down ld: warning: -segaddr __TEXT not page aligned, rounding down ld: warning: -segaddr __DATA not page aligned, rounding down ld: segments overlap: __DATA (0x0005DFFE + 0x0000F000) and __LINKEDIT (0x0005E000 + 0x00001000) collect2: ld returned 1 exit status make[3]: *** [boot] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
Comment 4 by Gabriel Somlo, Jan 21, 2013
Hi, I'm encountering the same problem with rev. 2168 (trunk and tags/2.1). Increasing DATA_PAD from its current value of 3582 by 1 to 3583 generates the same error message. Increasing by 2 or more (to anything greater than or equal to 3584) results in ld: warning: -segaddr __INIT not page aligned, rounding down ld: warning: -segaddr __TEXT not page aligned, rounding down ld: image too large: address can't fit in 31-bit r_address field in boot2 from /Users/foo/Desktop/Chameleon/trunk/obj/i386/boot2/boot2.o instead of the previous "ld: segments overlap" error. Please help, I'm also on up-to-date SnowLeopard (10.6.8) with Xcode 3.2.6 (1761) (whatever shipped with 10.6 plus most recent software updates applied). Same gcc version as original poster. Thanks !
Sign in to reply to this comment.
Reported by Konstantinos Giannakas, Nov 1, 2012