[PATCH] ARM: xip: Move XIP linking to a separate file

Michal Marek mmarek at suse.com
Thu Nov 19 07:07:04 PST 2015


On 2015-11-19 15:24, Chris Brandt wrote:
> When building an XIP kernel, the linker script needs to be much different
> than a conventional kernel's script. Over time, it's been difficult to
> maintain both XIP and non-XIP layouts in one linker script. Therefore,
> this patch separates the two procedures into two completely different
> files.
> 
> The new linker script is essentially a straight copy of the current script
> with all the non-CONFIG_XIP_KERNEL portions removed.
> 
> Additionally, all CONFIG_XIP_KERNEL portions have been removed from the
> existing linker script...never to return again.
> 
> From now on, for any architecture, when CONFIG_XIP_KERNEL is enabled, you
> must provide a vmlinux-xip.lds.S for the build process.

Why not have a vmlinux.lds.S and #include a vmlinux-xip.lds.S /
vmlinux-nonxip.lds.S from there? That way, you do not clutter the main
Makefile and you can reuse the boilerplate of the linker script.

Michal




More information about the linux-arm-kernel mailing list