[Skiboot] [PATCH 3/4] build/lds: place remaining sections according to defaults

Nicholas Piggin npiggin at gmail.com
Sun Apr 14 22:50:40 AEST 2019


Place remaining orphan linker sections according to default script
as described by `ld --verbose`.

Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
 skiboot.lds.S | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/skiboot.lds.S b/skiboot.lds.S
index 967fdbf3e..ef7db23aa 100644
--- a/skiboot.lds.S
+++ b/skiboot.lds.S
@@ -99,7 +99,7 @@ SECTIONS
 	_stext = .;
  	.text : {
 		*(.text*)
-		*(.sfpr)
+		*(.sfpr .glink)
 	}
 	_etext = .;
 
@@ -161,10 +161,15 @@ SECTIONS
 		*(.rela*)
 		__rela_dyn_end = .;
 	}
+	.plt    : { *(.plt) *(.iplt) }
 
-	.hash   : { *(.hash)   }
-	.dynsym : { *(.dynsym) }
-	.dynstr : { *(.dynstr) }
+	.hash          : { *(.hash)   }
+	.gnu.hash      : { *(.gnu.hash) }
+	.dynsym        : { *(.dynsym) }
+	.dynstr        : { *(.dynstr) }
+	.gnu.version   : { *(.gnu.version) }
+	.gnu.version_d : { *(.gnu.version_d) }
+	.gnu.version_r : { *(.gnu.version_r) }
 
 	. = ALIGN(0x10);
 	.sym_map : {
@@ -201,6 +206,7 @@ SECTIONS
 
 	_sbss = .;
 	.bss : {
+		*(.dynbss)
 		*(.bss*)
 	}
 	. = ALIGN(0x10000);
@@ -219,6 +225,7 @@ SECTIONS
 
 	/* Discards */
 	/DISCARD/ : {
+		*(.note.GNU-stack)
 		*(.comment)
 		*(.eh_frame)
 		*(.interp)
-- 
2.20.1



More information about the Skiboot mailing list