I have a working linker script. I want to add another data section whose contents is pulled directly from a file (ld shouldn't parse it and extract the sections and so on). How can I do that?
OUTPUT_FORMAT("elf32-i386")
ENTRY(start)
SECTIONS
{
.text 0x100000 : {
*(.multiboot)
*(.text)
*(.code)
*(.rodata*)
}
.data : {
*(.data)
}
.bss : {
*(.bss)
}
kernel_end = .;
roottask_start = .;
.data : {
HERE I WANT TO INCLUDE THE ENTIRE CONTENTS OF ANOTHER (BINARY) FILE
}
roottask_end = .;
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…