-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
2 changed files
with
2 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3b14204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi
I am trying to build
uboot
in an OpenWrt build environment on a macOS x86-64 build system.With this commit I get a
segmentation fault 11
when running themkimage
tool.After some searching I got the idea that
getsectdata
may not be the right approach butgetsectiondata
.If I use the attached patch
mkimage
does the right thing on my build system.Please can you help me with this?
Thank you very much.
3b14204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi
please can someone take a look at this? @jrtc27 @trini
With macOS version 11.4-x86_64 I still get a
segmentation fault 11
running themkimage
tool.getsectiondata
is undocumented but we can adjust the address by calling_dyld_get_image_vmaddr_slide(uint32_t image_index)
andimage_index 0 here means main executable.
3b14204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, probably needs something like https://sources.debian.org/src/qtwebengine-opensource-src/5.15.2+dfsg-3/src/3rdparty/chromium/third_party/tcmalloc/chromium/src/base/basictypes.h/?hl=321#L308-L343 then rather than hard-coding index 0?
3b14204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes but is that really necessary in this case?
3b14204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@k-ronny hi, your patch fix the issue for me, but just some changes base of:
3b14204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jrtc27 Hi,
in the meantime there was a PR (https://lists.denx.de/pipermail/u-boot/2021-December/468875.html) to address this problem. May I ask you to take note of this / a look at it? There are at least two projects (of which I know) that have to deal with this problem: Homebrew and OpenWrt.
Thank you.
3b14204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please bounce that email to me so I can easily reply?
3b14204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR is from @svlobanov so we should ask him.
@svlobanov Could you do that?
3b14204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've sent to jrtc27@the-same-domain dot com
3b14204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jrtc27 could you please take a look at 2nd version https://lists.denx.de/pipermail/u-boot/2022-January/472133.html ?
3b14204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not subscribed to the mailing list and don't intend to, can you please just bounce it to me again? (Ideally would've just been Cc'ed on that original email...)
3b14204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for the record, U-Boot is also on lore.kernel.org so b4/lei work as well as the links to download as mbox, etc, there. And thanks folks!
3b14204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I didn't realise that, thanks, downloading from lore is easy
3b14204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jrtc27 I have already added you to the thread in maillist