Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Mar 2020 22:18:01 +0000 (UTC)
From:      Alex Richardson <arichardson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r359230 - head/sys/conf
Message-ID:  <202003222218.02MMI1rT017311@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arichardson
Date: Sun Mar 22 22:18:00 2020
New Revision: 359230
URL: https://svnweb.freebsd.org/changeset/base/359230

Log:
  Fix linking OCTEON1 kernel with LLD
  
  LLD complains that the type of .dynamic was changed. Fix this by copying
  the approach used in the mips64 ldscript.
  I do not have hardware to test this change so I only verified that the
  kernel links and the section layout looks sensible.
  
  Reviewed By:	imp, emaste
  Differential Revision: https://reviews.freebsd.org/D24093

Modified:
  head/sys/conf/ldscript.mips.octeon1

Modified: head/sys/conf/ldscript.mips.octeon1
==============================================================================
--- head/sys/conf/ldscript.mips.octeon1	Sun Mar 22 21:51:50 2020	(r359229)
+++ head/sys/conf/ldscript.mips.octeon1	Sun Mar 22 22:18:00 2020	(r359230)
@@ -10,8 +10,7 @@ SECTIONS {
 	. = KERNLOADADDR + SIZEOF_HEADERS;
 
 	.text : {
-	    	*(.text)
-		*(.dynamic)
+		*(.text)
 		etext = .;
 		_etext = .;
 		. = ALIGN(0x2000);
@@ -35,8 +34,10 @@ SECTIONS {
 	    	*(.data)
 		. = ALIGN(32);
 	}
-
-	_gp = (. + 0x8000);
+	.plt : { *(.plt) }
+	_gp = ALIGN(16) + 0x7ff0;
+	.got : { *(.got.plt) *(.got) }
+	.dynamic : { *(.dynamic) }
 
 	.sdata : {
                 _small_start = .;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003222218.02MMI1rT017311>