aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-10-25 08:42:24 -0700
committerH.J. Lu <hjl.tools@gmail.com>2021-10-26 16:24:24 -0700
commitf85dcfc3af9cf7c2859241253f1d37b1133abea2 (patch)
treee1ccd878a523c3cfd340abcd5b12e7f952acf8fa /gold/layout.h
parenta4b0231e179607e47b1cdf1fe15c5dc25e482fad (diff)
downloadgdb-f85dcfc3af9cf7c2859241253f1d37b1133abea2.zip
gdb-f85dcfc3af9cf7c2859241253f1d37b1133abea2.tar.gz
gdb-f85dcfc3af9cf7c2859241253f1d37b1133abea2.tar.bz2
gold: Place .note.gnu.property section before other note sections
Place the .note.gnu.property section before all other note sections to avoid being placed between other note sections with different alignments. PR gold/28494 * layout.cc (Layout::create_note): Set order to ORDER_PROPERTY_NOTE for the .note.gnu.property section. * layout.h (Output_section_order): Add ORDER_PROPERTY_NOTE.
Diffstat (limited to 'gold/layout.h')
-rw-r--r--gold/layout.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/gold/layout.h b/gold/layout.h
index 0b37800..05c3171 100644
--- a/gold/layout.h
+++ b/gold/layout.h
@@ -399,8 +399,13 @@ enum Output_section_order
// linker can pick it up quickly.
ORDER_INTERP,
- // Loadable read-only note sections come next so that the PT_NOTE
- // segment is on the first page of the executable.
+ // The .note.gnu.property section comes next so that the PT_NOTE
+ // segment is on the first page of the executable and it won't be
+ // placed between other note sections with different alignments.
+ ORDER_PROPERTY_NOTE,
+
+ // Loadable read-only note sections come after the .note.gnu.property
+ // section.
ORDER_RO_NOTE,
// Put read-only sections used by the dynamic linker early in the