This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]