DragonFly BSD
DragonFly commits List (threaded) for 2012-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: loader: Add linker scripts for gold v2.22

From: John Marino <marino@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 24 Feb 2012 15:49:23 -0800 (PST)

commit 208fbaaf29ac0c3a2b0fb28ac3d4e500899b3646
Author: John Marino <draco@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


DragonFly BSD source repository

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]