From a7a32d588f29466221f5b4d421d0fc0a652dae48 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 21 Dec 2022 10:23:08 +0000 Subject: [PATCH] Keep the .drectve section when performing a relocateable link. PR 29900 * scripttempl/pe.sc: Keep the .drectve section when performing a relocateable link. * scripttempl/pep.sc: Likewise. --- ld/ChangeLog | 7 +++++++ ld/scripttempl/pe.sc | 2 +- ld/scripttempl/pep.sc | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 8cff90b559b..12076310b0d 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2022-12-21 Nick Clifton + + PR 29900 + * scripttempl/pe.sc: Keep the .drectve section when performing a + relocateable link. + * scripttempl/pep.sc: Likewise. + 2022-12-08 Nick Clifton PR 29861 diff --git a/ld/scripttempl/pe.sc b/ld/scripttempl/pe.sc index d56309e84fb..6f559cf5e70 100644 --- a/ld/scripttempl/pe.sc +++ b/ld/scripttempl/pe.sc @@ -203,7 +203,7 @@ SECTIONS *(.debug\$S) *(.debug\$T) *(.debug\$F) - *(.drectve) + ${RELOCATING+ *(.drectve)} ${RELOCATING+ *(.note.GNU-stack)} ${RELOCATING+ *(.gnu.lto_*)} } diff --git a/ld/scripttempl/pep.sc b/ld/scripttempl/pep.sc index f8fa74364aa..cb404eb070a 100644 --- a/ld/scripttempl/pep.sc +++ b/ld/scripttempl/pep.sc @@ -208,7 +208,7 @@ SECTIONS *(.debug\$S) *(.debug\$T) *(.debug\$F) - *(.drectve) + ${RELOCATING+ *(.drectve)} ${RELOCATING+ *(.note.GNU-stack)} ${RELOCATING+ *(.gnu.lto_*)} } -- 2.30.2