link.ld Example Explanation
Posted: Sun Jan 17, 2010 4:48 pm
Hello,
I've compiled successfully the FreeBASIC Barebones Example, there we have a example to use with ld called link.ld:
But as I've only used ld one time that my friend sent me a source to be compiled and I need to use ld, but someone could please explain me line-by-line about this script?
Best Regards,
Nathan Paulino Campos
I've compiled successfully the FreeBASIC Barebones Example, there we have a example to use with ld called link.ld:
Code: Select all
OUTPUT_FORMAT("elf32-i386")
ENTRY (loader)
SECTIONS{
. = 0x00100000;
.text :{
KERNEL_START = .;
*(.text)
}
.rodata ALIGN (0x1000) : {
*(.rodata)
_CTORS = .;
*(.ctors)
_CTORS_END = .;
}
.data ALIGN (0x1000) : {
*(.data)
}
.bss : {
SBSS = .;
*(COMMON)
*(.bss)
EBSS = .;
KERNEL_END = .;
}
}
Best Regards,
Nathan Paulino Campos