2021-12-02 16:02:23 +00:00
|
|
|
This patch fixes compilation issues on MacOS arm64.
|
|
|
|
Based on discussion
|
|
|
|
https://github.com/u-boot/u-boot/commit/3b142045e8a7f0ab17b6099e9226296af45967d0
|
|
|
|
|
|
|
|
--- a/tools/imagetool.h
|
|
|
|
+++ b/tools/imagetool.h
|
2021-11-26 00:38:31 +00:00
|
|
|
@@ -272,11 +272,14 @@ int rockchip_copy_image(int fd, struct i
|
2021-12-02 16:02:23 +00:00
|
|
|
* b) we need a API call to get the respective section symbols */
|
|
|
|
#if defined(__MACH__)
|
|
|
|
#include <mach-o/getsect.h>
|
|
|
|
+#include <mach-o/dyld.h>
|
|
|
|
|
|
|
|
#define INIT_SECTION(name) do { \
|
|
|
|
unsigned long name ## _len; \
|
2021-11-26 00:38:31 +00:00
|
|
|
char *__cat(pstart_, name) = getsectdata("__DATA", \
|
2021-12-02 16:02:23 +00:00
|
|
|
#name, &__cat(name, _len)); \
|
|
|
|
+ __cat(pstart_, name) += \
|
|
|
|
+ _dyld_get_image_vmaddr_slide(0); \
|
|
|
|
char *__cat(pstop_, name) = __cat(pstart_, name) + \
|
|
|
|
__cat(name, _len); \
|
|
|
|
__cat(__start_, name) = (void *)__cat(pstart_, name); \
|