git: loader: Add linker scripts for gold v2.22
John Marino
marino at crater.dragonflybsd.org
Fri Feb 24 15:49:23 PST 2012
commit 208fbaaf29ac0c3a2b0fb28ac3d4e500899b3646
Author: John Marino <draco at marino.st>
Date: Fri Feb 24 18:33:50 2012 +0100
loader: Add linker scripts for gold v2.22
The program header handling defaults for the gold linker that comes with
binutils 2.22 changed from the 2.21 version. As a result, DragonFly's
loader broke when linked with gold, rendering it unbootable.
The solution is to provide dedicated linker scripts for btx, btxldr, and
the loader itself. These scripts specify how to handle the program
headers. In these cases, we don't want to embed the headers in the first
LOAD segment which is what gold was doing, so the PDHRS section of the
scripts prevents that from happening.
The gnu ld-built loader still builds just fine with these linker scripts.
Summary of changes:
sys/boot/pc32/btx/btx/Makefile | 6 +-
sys/boot/pc32/btx/btx/btx.ldscript | 11 ++
sys/boot/pc32/btx/btxldr/Makefile | 4 +-
sys/boot/pc32/btx/btxldr/btxldr.ldscript | 10 ++
sys/boot/pc32/loader/Makefile | 8 +-
sys/boot/pc32/loader/loader.ldscript | 202 ++++++++++++++++++++++++++++++
sys/boot/pc32/loader_tftp/Makefile | 8 +-
7 files changed, 233 insertions(+), 16 deletions(-)
create mode 100644 sys/boot/pc32/btx/btx/btx.ldscript
create mode 100644 sys/boot/pc32/btx/btxldr/btxldr.ldscript
create mode 100644 sys/boot/pc32/loader/loader.ldscript
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/208fbaaf29ac0c3a2b0fb28ac3d4e500899b3646
--
DragonFly BSD source repository
More information about the Commits
mailing list