[PATCH] D60250: [llvm-objdump] Allow -dynamic-reloc on ET_EXEC files

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 02:53:52 PDT 2019


jhenderson added a comment.

In D60250#1461461 <https://reviews.llvm.org/D60250#1461461>, @PkmX wrote:

> In D60250#1461308 <https://reviews.llvm.org/D60250#1461308>, @MaskRay wrote:
>
> >
>
>
> Yeah the rule is a bit weird but I think `ET_DYN` without a `.dynamic` section is really a corner case. I did try to craft one by hex-editing and ran `objdump -R` on it, which did successfully *workaround* this condition but then it hit another error in another place.


You can use `objcopy -R .dynamic` to remove the .dynamic without resorting to hex-editing. I've seen developers do some pretty weird "corner case" things and still expect things to work, so it would be good if we can achieve it, assuming the logic isn't too hard. Since it just makes sense to ignore the ELF type entirely, I think this resolves the concern anyway.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60250/new/

https://reviews.llvm.org/D60250





More information about the llvm-commits mailing list