PHDRS command in the kernel linker script
Bernhard Walle
bwalle@suse.de
Tue Dec 19 15:39:00 GMT 2006
Hello,
I think here are the right persons to answer my question. Here's the
linker script I'm talking about:
http://www.bwalle.de/temp/vmlinux.lds.S
With this linker script, the ld (GNU ld version 2.17.50.0.5 20060927
(SUSE Linux)) puts all sections starting with .data.init_task until
.data_nosave [1] into both, data and data.init.
So, readelf -l on the resulting binary looks like:
00 [...]
01 .data .bss .data.cacheline_aligned .data.read_mostly .data.init_task .data.page_aligned .init.text .init.data .init.setup .initcall.init .con_initcall.init .altinstructions .altinstr_replacement .exit.text .init.ramfs .data_nosave
02 .vsyscall_0 .xtime_lock .vxtime .wall_jiffies .sys_tz .sysctl_vsyscall .xtime .jiffies .vsyscall_1 .vsyscall_2 .vsyscall_3
03 .data.init_task .data.page_aligned .init.text .init.data .init.setup .initcall.init .con_initcall.init .altinstructions .altinstr_replacement .exit.text .init.ramfs .data_nosave
04
If CONFIG_XEN is defined, which means the BSS section is put in the
end, it works as expected.
So: Can somebody explain me the reason for this and give me possibly a
solution? Thanks a lot!
Regards,
Bernhard
[1] which means .data.init_task .data.page_aligned .init.text
.init.data .init.setup .initcall.init .con_initcall.init
.altinstructions .altinstr_replacement .exit.text .init.ramfs
.data_nosave
More information about the Binutils
mailing list