This is an archive of the discontinued LLVM Phabricator instance.

[ELF] --orphan-handling=: don't warn/error for input SHT_REL[A] retained by --emit-relocs
ClosedPublic

Authored by MaskRay on Feb 25 2020, 4:57 PM.

Details

Summary

They are purposefully skipped by input section descriptions (rL295324).
Similarly, --orphan-handling= should not warn/error for them.
This behavior matches GNU ld.

Diff Detail

Event Timeline

MaskRay created this revision.Feb 25 2020, 4:57 PM
MaskRay updated this revision to Diff 246601.Feb 25 2020, 4:59 PM

Use -o /dev/null (the output file is not significant)

kees added a comment.Feb 25 2020, 8:23 PM

Awesome! With this and D75149 my defconfig kernel build now only shows:

ld.lld: warning: <internal>:(.symtab) is being placed in '.symtab'
ld.lld: warning: <internal>:(.shstrtab) is being placed in '.shstrtab'
ld.lld: warning: <internal>:(.strtab) is being placed in '.strtab'

Nice :)

grimar accepted this revision.Feb 26 2020, 1:12 AM

LGTM

This revision is now accepted and ready to land.Feb 26 2020, 1:12 AM
This revision was automatically updated to reflect the committed changes.