if (needsInterpSection())
OutputSections.push_back(Out<ELFT>::Interp);
+ // A core file does not usually contain unmodified segments except
+ // the first page of the executable. Add the build ID section now
+ // so that the section is included in the first page.
+ if (Out<ELFT>::BuildId)
+ OutputSections.push_back(Out<ELFT>::BuildId);
+
// Create output sections for input object file sections.
std::vector<OutputSectionBase<ELFT> *> RegularSections;
OutputSectionFactory<ELFT> Factory;
// This order is not the same as the final output order
// because we sort the sections using their attributes below.
- Add(Out<ELFT>::BuildId);
Add(Out<ELFT>::SymTab);
Add(Out<ELFT>::ShStrTab);
Add(Out<ELFT>::StrTab);
_start:
nop
+.section .note.test, "a", @note
+ .quad 42
+
# BUILDID: Contents of section .note.gnu.build-id:
# BUILDID-NEXT: 04000000 08000000 03000000 474e5500 ............GNU.
+# BUILDID: Contents of section .note.test:
# NO-BUILDID-NOT: Contents of section .note.gnu.build-id: