Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Apr 2018 12:37:00 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Ed Maste <emaste@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r332090 - head/stand/i386
Message-ID:  <CANCZdfrng9YA8oToJGKmywXfT82%2B3uwGKOhXKW%2BmrSq=tjGBpw@mail.gmail.com>
In-Reply-To: <8352524.sDEuJtqkT0@ralph.baldwin.cx>
References:  <201804060257.w362vwi3023158@repo.freebsd.org> <8352524.sDEuJtqkT0@ralph.baldwin.cx>

index | next in thread | previous in thread | raw e-mail

On Fri, Apr 6, 2018 at 11:54 AM, John Baldwin <jhb@freebsd.org> wrote:

> On Friday, April 06, 2018 02:57:58 AM Ed Maste wrote:
> > Author: emaste
> > Date: Fri Apr  6 02:57:58 2018
> > New Revision: 332090
> > URL: https://svnweb.freebsd.org/changeset/base/332090
> >
> > Log:
> >   stand: pass --no-rosegment for i386 bits when linking with lld
> >
> >   btxld does not correctly handle input with other than 2 PT_LOAD
> >   segments.  Passing --no-rosegment lets lld produce output eqivalent to
> >   ld.bfd: 2 PT_LOAD segments and no PT_GNU_RELRO.
> >
> >   PR:         225775
> >   MFC after:  3 weeks
> >   Sponsored by:       The FreeBSD Foundation
> >   Differential Revision:      https://reviews.freebsd.org/D14956
> >
> > Modified:
> >   head/stand/i386/Makefile.inc
> >
> > Modified: head/stand/i386/Makefile.inc
> > ============================================================
> ==================
> > --- head/stand/i386/Makefile.inc      Fri Apr  6 02:47:43 2018
> (r332089)
> > +++ head/stand/i386/Makefile.inc      Fri Apr  6 02:57:58 2018
> (r332090)
> > @@ -2,8 +2,13 @@
> >  #
> >  # $FreeBSD$
> >
> > +.sinclude <bsd.linker.mk>
> > +
> >  LOADER_ADDRESS?=0x200000
> >  LDFLAGS+=    -nostdlib
> > +.if defined(LINKER_TYPE) && ${LINKER_TYPE} == "lld"
> > +LDFLAGS+=    -Wl,--no-rosegment
> > +.endif
>
> Maybe we should support LDFLAGS.${LINKER_TYPE} as we do for CFLAGS, etc.?
>

I concur. It doesn't take too many of these for that to pay off big time,
especially if we have to do anything globally...

Warner


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrng9YA8oToJGKmywXfT82%2B3uwGKOhXKW%2BmrSq=tjGBpw>