Problem: How to specify Library in ld-Link-Script?

Hi all!

I'm trying to get BootUp-code for x86 (Pentium3) architecture working, using gcc an ld. Because after bootup only the F-Segment is visible to CPU, I need to place the "early" boot-code there. This also includes three libraries needed. How can i specify the libraries, so that the code from them gets into the correct segment?

This is my actual link - script which does NOT work. All libraries are placed in codeExtSeg, although specified in codeStartSeg...!?

MEMORY { /* Just F-Seg */ codeStartSeg : ORIGIN = 0xf0000, LENGTH = 64K - 0x10 /* Rest of code should got here */ codeExtSeg : ORIGIN = 0xfff00000, LENGTH = 512K - 64K - 0x10

}

codeStartSeg_memory_location = 0xf0000 ; codeStartSeg_file_offset = 0x70000 ;

codeExtSeg_memory_location = 0xfff00000 ; codeExtSeg_file_offset = 0x0 ;

SECTIONS {

.codeStartSeg codeStartSeg_memory_location : AT (codeStartSeg_file_offset) { target\obj\protected_mode_switch.o(.text .rodata) target\bin\setjmp.o(.text .rodata) target\bin\longjmp.o(.text .rodata) target\bin\bootLib.o(.text .rodata) target\bin\sysLib.o(.text .rodata)

libsfl_p6.a /*************** I'd like to have this libs here in codeStartSeg, but ld places them into codeExtSeg... ?!? */ libsfl_440bx.a libsfl_core.a } >codeStartSeg

.text codeExtSeg_memory_location : AT (codeExtSeg_file_offset) { target\bin\RomTbl.o(.text .rodata)

*(.text) *(.rodata) } >codeExtSeg

Can anyone give me a hint, how to get ld to place the libs into codeStartSeg?

Any help is appreciated! Many thanks,

Thomas

Reply to
Thomas Obermair
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.