From bc6588d0f9cff080d54e442d5833bf1e527cfda7 Mon Sep 17 00:00:00 2001 From: Edmund Grimley Evans Date: Fri, 2 Sep 2016 17:02:55 +0100 Subject: [PATCH] i#1227 ARM: Replace --thumb-entry with --entry in utils.cmake. With "--thumb-entry" the test programs fib-conflict{,-early} fail, natively or under DynamoRIO, on Raspbian (Raspberry Pi 3), because the start-up code is A32 (ARM mode). With "--entry" bit 0 of the entry point is set correctly depending on whether _start is A32 (ARM) or T32 (Thumb). Review-URL: https://codereview.appspot.com/310770043 --- make/utils.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/make/utils.cmake b/make/utils.cmake index 4e5d1078055..3e9e177bbb4 100644 --- a/make/utils.cmake +++ b/make/utils.cmake @@ -207,8 +207,9 @@ if (UNIX) endif () endif () if (ARM AND NOT set_bounds) # XXX: don't want for libDR: using "set_bounds" for now - # Somehow the entry point gets changed to ARM by using ldscript - set(ldflags "${ldflags} -Wl,--thumb-entry -Wl,_start") + # Somehow the entry point gets changed to A32 by using ldscript. + # Adding --entry causes the linker to set it to either A32 or T32 as appropriate. + set(ldflags "${ldflags} -Wl,--entry -Wl,_start") endif () append_property_string(TARGET ${target} LINK_FLAGS "${ldflags}") endfunction (set_preferred_base_start_and_end)