[PATCH] Allow overriding of symbols in libgloss/arm/crt0.S.

Jeff Johnston jjohnstn@redhat.com
Wed Aug 15 04:41:00 GMT 2007


Patch applied.

-- Jeff J.

Carlos O'Donell wrote:
> A bug in crt0.S prevents overriding the values of __stack,
> hardware_init_hook, and software_init_hook by linker scripts or program
> code.
> 
> In the libgloss/arm/crt0.S startup the symbols __stack,
> hardware_init_hook, software_init_hook are set with '.set <symbol>,0'.
> Using '.set' causes the linker to emit a relocation against *ABS*, and
> therefore the value cannot be overriden in a linker script or program.
> 
> A weak reference that remains unresolved will be given a value of zero,
> giving the desired behaviour.
> 
> This patch removes the '.set' for __stack, hardware_init_hook, and
> software_init_hook, allowing the linker script to override the value if
> required.
> 
> Tested on arm-none-eabi without regressions.
> 
> Please apply.
> 
> Cheers,
> Carlos.



More information about the Newlib mailing list