Date: Tue, 25 Feb 2020 00:45:09 +0000 (UTC) From: Brandon Bergren <bdragon@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358304 - head/stand/powerpc/ofw Message-ID: <202002250045.01P0j9eE029272@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdragon Date: Tue Feb 25 00:45:09 2020 New Revision: 358304 URL: https://svnweb.freebsd.org/changeset/base/358304 Log: [PowerPC] Fix LLD10 linking of ofw loader on ppc Before this change, LLD10 was creating several extra PT_LOAD sections, which OFW does not understand. Like we do for the kernel already, specify the program headers manually. Additionally, to work around a crash in our base ld.bfd, we need to actually assign something to the output section. LLD does not need this. One side effect of this change is the removal of the GNU_STACK header. This is more correct, since we are using a statically-allocated stack and RWX mappings across the board this early in boot. Reviewed by: jhibbits, Fangrui Song <i@maskray.me> Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D23778 Modified: head/stand/powerpc/ofw/ldscript.powerpc Modified: head/stand/powerpc/ofw/ldscript.powerpc ============================================================================== --- head/stand/powerpc/ofw/ldscript.powerpc Tue Feb 25 00:37:13 2020 (r358303) +++ head/stand/powerpc/ofw/ldscript.powerpc Tue Feb 25 00:45:09 2020 (r358304) @@ -6,11 +6,15 @@ OUTPUT_ARCH(powerpc:common) ENTRY(_start) SEARCH_DIR(/usr/lib); PROVIDE (__stack = 0); +PHDRS +{ + text PT_LOAD; +} SECTIONS { /* Read-only sections, merged into text segment: */ . = 0x02c00000 + SIZEOF_HEADERS; - .interp : { *(.interp) } + .interp : { *(.interp) } :text .hash : { *(.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002250045.01P0j9eE029272>