Fix -1 e_flags with binary inputs#403
Merged
quic-seaswara merged 2 commits intoqualcomm:mainfrom Sep 25, 2025
Merged
Conversation
quic-seaswara
approved these changes
Sep 17, 2025
jonathonpenix
approved these changes
Sep 17, 2025
Contributor
jonathonpenix
left a comment
There was a problem hiding this comment.
Thanks @quic-areg!
Contributor
|
ARM/AArch64 does not implement checkFlags |
Contributor
Author
lld seems to not zero flags for binary inputs for Hexagon, Arm, AArch64 either so that should be ok |
quic-seaswara
requested changes
Sep 18, 2025
Contributor
There was a problem hiding this comment.
Please zero the flags for all architectures, it does not make sense to not have the flags 0'ed for specific architectures.
$arm-none-eabi-ld.bfd -marmelf --format=binary mydata.blob -o mydata.elf && llvm-readelf -h mydata.elf | grep Flags
Flags: 0x0
$aarch64-linux-gnu-ld.bfd -maarch64elf --format=binary mydata.blob -o mydata.elf && llvm-readelf -h mydata.elf | grep Flags
Flags: 0x0
Please compare bfd behavior at all times
parth-07
reviewed
Sep 18, 2025
quic-seaswara
requested changes
Sep 18, 2025
552b578 to
8c92cee
Compare
quic-seaswara
requested changes
Sep 19, 2025
Contributor
quic-seaswara
left a comment
There was a problem hiding this comment.
Instead of creating seperate commits this way, I would appreciate if you could seperate each target specific change to a seperate commit or a PR.
Combining all of them together is making it hard to review.
Binary files have no architecture flags, so the default value of -1 is used instead of 0. Also removes unused code in TargetInfo.h Signed-off-by: quic-areg <aregmi@quicinc.com>
quic-seaswara
requested changes
Sep 23, 2025
Signed-off-by: quic-areg <aregmi@quicinc.com>
quic-seaswara
approved these changes
Sep 24, 2025
Contributor
|
Please document this behavior in linker documentation |
parth-07
reviewed
Sep 25, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Binary files have no architecture flags, so the
default value of -1 is used instead of 0.
Fixes #396