Page MenuHomePhabricator

[ELF] Do not omit debug sections when computing build-id

Authored by phosek on Aug 31 2016, 10:38 PM.



The primary use of build-id is in debugging, hence omitting debug sections when computing it significantly reduces its usability as changes in debug section content wouldn't alter the build-id.

Diff Detail


Event Timeline

phosek updated this revision to Diff 69945.Aug 31 2016, 10:38 PM
phosek retitled this revision from to [ELF] Do not omit debug sections when computing build-id.
phosek updated this object.
phosek added a reviewer: ruiu.
phosek added a project: lld.
phosek added a subscriber: llvm-commits.

This was pointed out by Roland McGrath who proposed the build-id feature and did the original implementation in BFD ld. The original feature proposal can be found here.

ruiu edited edge metadata.Sep 1 2016, 2:20 PM

It is unfortunate that this speed hack didn't work.

1323 ↗(On Diff #69945)

... of the output file.

1328 ↗(On Diff #69945)

Please simplify writeBuildId so that it takes just a uint8_t pointer and size instead of an array of arrays.

phosek updated this revision to Diff 70080.Sep 1 2016, 3:23 PM
phosek edited edge metadata.
phosek marked 2 inline comments as done.
phosek added inline comments.
1328 ↗(On Diff #69945)

I've changed it to use ArrayRef<uint8_t>, do you prefer to use pointer and size instead?

ruiu accepted this revision.Sep 1 2016, 3:35 PM
ruiu edited edge metadata.


1325–1326 ↗(On Diff #70080)

I'm fine in either way.

This revision is now accepted and ready to land.Sep 1 2016, 3:35 PM
This revision was automatically updated to reflect the committed changes.