ARM: Tell the linker memset and memcpy are functions.
The memset and memcpy functions are assembled as ARM code, likely because that's the default of the assembler. Without special annotation, the assembler and linker don't know that those symbols are functions which need special handling so that ARM/thumb issues are handled properly. This change adds that annotation which gets those functions working in Coreboot which is compiled as thumb. Libpayload and depthcharge are compiled as ARM so they don't *need* the annotation since it just works out in ARM mode, but it's the safe thing to do in case we change that in the future. We should explicitly select ARM vs. thumb when assembling assembly files to be consistent across builds and toolchains. Change-Id: I814b137064cf46ae9e2744ff6c223b695dc1ef01 Signed-off-by: Gabe Black <gabeblack@chromium.org> Reviewed-on: http://review.coreboot.org/3672 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
fbb11cf979
commit
001056f560
|
@ -57,6 +57,7 @@
|
||||||
|
|
||||||
/* Prototype: void *memcpy(void *dest, const void *src, size_t n); */
|
/* Prototype: void *memcpy(void *dest, const void *src, size_t n); */
|
||||||
|
|
||||||
|
.type memcpy, function
|
||||||
.globl memcpy
|
.globl memcpy
|
||||||
memcpy:
|
memcpy:
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
* memset again.
|
* memset again.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
.type memset, function
|
||||||
.globl memset
|
.globl memset
|
||||||
memset:
|
memset:
|
||||||
ands r3, r0, #3 @ 1 unaligned?
|
ands r3, r0, #3 @ 1 unaligned?
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
|
|
||||||
/* Prototype: void *memcpy(void *dest, const void *src, size_t n); */
|
/* Prototype: void *memcpy(void *dest, const void *src, size_t n); */
|
||||||
|
|
||||||
|
.type memcpy, function
|
||||||
.globl memcpy
|
.globl memcpy
|
||||||
memcpy:
|
memcpy:
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
* memset again.
|
* memset again.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
.type memset, function
|
||||||
.globl memset
|
.globl memset
|
||||||
memset:
|
memset:
|
||||||
ands r3, r0, #3 @ 1 unaligned?
|
ands r3, r0, #3 @ 1 unaligned?
|
||||||
|
|
Loading…
Reference in New Issue