Skip to content

Commit

Permalink
i#1227 ARM: Replace --thumb-entry with --entry in utils.cmake.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
egrimley-arm committed Sep 2, 2016
1 parent 47c65c9 commit bc6588d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions make/utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bc6588d

Please sign in to comment.