
Hi Mike,
On Mon, Feb 6, 2012 at 8:01 AM, Mike Frysinger vapier@gentoo.org wrote:
On Saturday 04 February 2012 22:02:45 Troy Kisky wrote:
since we preprocess our linker scripts now, i'd suggest using #include rather than INCLUDE
+1
--- /dev/null +++ b/u-boot-common.lds
- . = ALIGN(4);
- __u_boot_cmd_start = .;
- .u_boot_cmd : {
- KEEP(*(.u_boot_cmd))
- }
- __u_boot_cmd_end = .;
rather than storing this in the top level dir, i'd suggest going the linux route and add a include/asm-generic/u-boot.lds.h header. then we can migrate
Except it's not a 'header' :) - include/asm-generic/u-boot.lds (or maybe u-boot.lds.common) should be what is included in u-boot.lds and include/asm-generic/u-boot.lds.h should be the externs for the symbols exported from the linker script
people over time and piece by piece without having to worry about breaking everyone at once ...
Here we go again ;) - Queue the 'what incentive will maintainers have to migrate to the common case' discussion...
On a (related) side not, do we need to lay down some ground rules for migrating to 'common' case? There seems to be a fair amount of new 'common code' or 'common architecture' being developed, but only being applied to one arch. I'm guilty too - my init sequence cleanups which lay the foundation for a common init sequence are only implemented for x86.
that also allows us to cater to arches (like Blackfin) that have a symbol prefix (underscore in the Blackfin case). add the VMLINUX_SYMBOL() macro, and then this code will look like: VMLINUX_SYMBOL(__u_boot_cmd_end) = .; (i picked VMLINUX_SYMBOL() only because that's what Linux already has defined)
How about U_BOOT_LDS_SYMBOL()?
Regards,
Graeme