This is an archive of the discontinued LLVM Phabricator instance.

LLD: ELF: Correctly identify SHT_NOTE sections with !SHF_ALLOC as type*Note
ClosedPublic

Authored by tstellarAMD on Jul 16 2015, 8:00 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

tstellarAMD retitled this revision from to LLD: ELF: Correctly identify SHT_NOTE sections with !SHF_ALLOC as type*Note.
tstellarAMD updated this object.
tstellarAMD added a subscriber: llvm-commits.
tstellarAMD added a subscriber: lld.
ruiu added inline comments.Aug 5 2015, 6:33 PM
lib/ReaderWriter/ELF/Atoms.cpp
77 ↗(On Diff #29911)

Don't you have to assign it to _contentType?

tstellarAMD added inline comments.Aug 5 2015, 6:41 PM
lib/ReaderWriter/ELF/Atoms.cpp
77 ↗(On Diff #29911)

I don't think this is necessary. This function is called from only one place: ELFDefinedAtom<ELFT>::contentType()
and the return value is assigned to _contentType here.

ruiu accepted this revision.Aug 5 2015, 7:33 PM
ruiu edited edge metadata.

LGTM

lib/ReaderWriter/ELF/Atoms.cpp
77 ↗(On Diff #29911)

Then maybe we should remove other assignments to _contentType from this function? (I'm not suggesting to do that in this patch, but in a separate one.)

This revision is now accepted and ready to land.Aug 5 2015, 7:33 PM
This revision was automatically updated to reflect the committed changes.