diff options
author | Jessica Clarke <jrtc27@jrtc27.com> | 2021-03-20 23:43:05 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-03-29 00:30:35 +0300 |
commit | 3b142045e8a7f0ab17b6099e9226296af45967d0 (patch) | |
tree | bbe4450a7d04e9a955597acea01988acf61c7205 /tools | |
parent | 6863c7f1b633d50e025ce34ad249b59a14c99b2a (diff) | |
download | u-boot-3b142045e8a7f0ab17b6099e9226296af45967d0.tar.xz |
Support building on macOS/arm64
On Arm-based Macs, -no_pie is ignored and gives a linker warning.
Moreover, the build falls over with:
ld: Absolute addressing not allowed in arm64 code but used in '_image_type_ptr_aisimage' referencing '_image_type_aisimage'
for dumpimage and mkimage, since we put data structs in text sections
not data sections and so cannot have dynamic relocations. Instead, move
the sections to __DATA and drop disabling PIE.
Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/imagetool.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/imagetool.h b/tools/imagetool.h index 8726792c8c..2801ea9e9f 100644 --- a/tools/imagetool.h +++ b/tools/imagetool.h @@ -273,14 +273,14 @@ int rockchip_copy_image(int fd, struct image_tool_params *mparams); #define INIT_SECTION(name) do { \ unsigned long name ## _len; \ - char *__cat(pstart_, name) = getsectdata("__TEXT", \ + char *__cat(pstart_, name) = getsectdata("__DATA", \ #name, &__cat(name, _len)); \ char *__cat(pstop_, name) = __cat(pstart_, name) + \ __cat(name, _len); \ __cat(__start_, name) = (void *)__cat(pstart_, name); \ __cat(__stop_, name) = (void *)__cat(pstop_, name); \ } while (0) -#define SECTION(name) __attribute__((section("__TEXT, " #name))) +#define SECTION(name) __attribute__((section("__DATA, " #name))) struct image_type_params **__start_image_type, **__stop_image_type; #else |