<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/gnu/usr.bin/binutils/ld/Makefile, branch releng/12.4</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2019-09-26T16:05:57Z</updated>
<entry>
<title>Add WITH_PIE knob to build Position Independent Executables</title>
<updated>2019-09-26T16:05:57Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2019-09-26T16:05:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0d5bda912521220c1a2061f9177dbaa6ff2f9c13'/>
<id>urn:sha1:0d5bda912521220c1a2061f9177dbaa6ff2f9c13</id>
<content type='text'>
MFC r344179: Add WITH_PIE knob to build Position Independent Executables

Building binaries as PIE allows the executable itself to be loaded at a
random address when ASLR is enabled (not just its shared libraries).

With this change PIE objects have a .pieo extension and INTERNALLIB
libraries libXXX_pie.a.

MK_PIE is disabled for some kerberos5 tools, Clang, and Subversion, as
they explicitly reference .a libraries in their Makefiles.  These can
be addressed on an individual basis later.  MK_PIE is also disabled for
rtld-elf because it is already position-independent using bespoke
Makefile rules.

Currently only dynamically linked binaries will be built as PIE.

MFC r344181: Fix Makefile conditional after r344179

MFC r344182: Use make's :tl instead of checking "no" and "NO"

MFC r344189: Fixup bsd.prog.mk after r344182

MFC r344211: wlandebug: disable PIE to fix build failure

libifconfig is built as a static-only PRIVATELIB (and there is no _pie.a
version) so disable PIE in libifconfig's consumer.

r345489: Fix GNU objdump build under WITH_PIE

Explicitly specified bare .a libraries need ${PIE_SUFFIX}.

r345490: Apply WITH_PIE changes to other binutils components

Followon to r345489, explicitly specified bare .a libraries need
${PIE_SUFFIX} (although these still built).

r345778: Fix gdb/kgdb build under WITH_PIE

Explicitly specified bare .a libraries need ${PIE_SUFFIX}.

Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>Rework how the ld link is handled in WORLDTMP from r322811.</title>
<updated>2018-06-20T16:10:02Z</updated>
<author>
<name>Bryan Drewery</name>
<email>bdrewery@FreeBSD.org</email>
</author>
<published>2018-06-20T16:10:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d74021d65b104beb34c3a0d4c65f149dd6882876'/>
<id>urn:sha1:d74021d65b104beb34c3a0d4c65f149dd6882876</id>
<content type='text'>
LLD_BOOTSTRAP (build) is independent of LLD_IS_LD (installed) so they
should not be based on each other.

This is related to upcoming WITH_SYSTEM_LINKER work.

Reviewed by:	emaste
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D15836
</content>
</entry>
<entry>
<title>When lld is ld, install bfd's man page as ld.bfd.1</title>
<updated>2018-03-04T01:37:49Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2018-03-04T01:37:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=337981bd8934020c82f7d6032fac9ed98a91b968'/>
<id>urn:sha1:337981bd8934020c82f7d6032fac9ed98a91b968</id>
<content type='text'>
When WITH_LLD_IS_LD is set, lld's man page is installed as ld.1.gz, as
was GNU BFD's man page prior to this change.

Reported by:	Tobias Kortkamp
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>Rename RELTOP since it will mean something else globally.</title>
<updated>2017-10-31T00:07:37Z</updated>
<author>
<name>Bryan Drewery</name>
<email>bdrewery@FreeBSD.org</email>
</author>
<published>2017-10-31T00:07:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=635718c0d98a470c4610f1f4c3c9d0a261e7fec2'/>
<id>urn:sha1:635718c0d98a470c4610f1f4c3c9d0a261e7fec2</id>
<content type='text'>
Sponsored by:	Dell EMC Isilon
</content>
</entry>
<entry>
<title>Rename LLD_AS_LD to LLD_IS_LD, for consistency with CLANG_IS_CC</title>
<updated>2017-01-27T01:59:12Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2017-01-27T01:59:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f52e4bdfd7b9b12bf0b9da8556b1190cc1e6aaf8'/>
<id>urn:sha1:f52e4bdfd7b9b12bf0b9da8556b1190cc1e6aaf8</id>
<content type='text'>
Reported by:	Dan McGregor &lt;dan.mcgregor usask.ca&gt;
</content>
</entry>
<entry>
<title>Add WITH_LLD_AS_LD build knob</title>
<updated>2016-11-25T13:15:28Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2016-11-25T13:15:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0aa5466e7d5279f04c22add1ee218a879753b94e'/>
<id>urn:sha1:0aa5466e7d5279f04c22add1ee218a879753b94e</id>
<content type='text'>
If set it installs LLD as /usr/bin/ld.  LLD (as of version 3.9) is not
capable of linking the world and kernel, but can self-host and link many
substantial applications. GNU ld continues to be used for the world and
kernel build, regardless of how this knob is set.

It is on by default for arm64, and off for all other CPU architectures.

Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>Switch GNU ld to be installed as ld.bfd and linked as ld</title>
<updated>2016-01-07T00:15:02Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2016-01-07T00:15:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=dbecd1bfdf736d7fff457b6f6e28f43365cb1dfa'/>
<id>urn:sha1:dbecd1bfdf736d7fff457b6f6e28f43365cb1dfa</id>
<content type='text'>
We intend to replace GNU ld with LLVM's lld, and on the path to there
we'll experiment with having lld installed or linked as /usr/bin/ld.
Thus, make ld.bfd the primary install target for GNU ld, to later
facilitate making the ld link optional.

Reviewed by:	davide, dim
Differential Revision:	https://reviews.freebsd.org/D4790
</content>
</entry>
<entry>
<title>Install ld also as ld.bfd, for use with cc -fuse-ld=bfd</title>
<updated>2015-12-23T14:31:26Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2015-12-23T14:31:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e7beaf996810218e8a2089acd591798b75aeb145'/>
<id>urn:sha1:e7beaf996810218e8a2089acd591798b75aeb145</id>
<content type='text'>
PR:		205409 [exp-run]
MFC after:	1 week
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>META MODE: Don't create .meta files when symlinking sources into the obj directory.</title>
<updated>2015-11-25T19:44:43Z</updated>
<author>
<name>Bryan Drewery</name>
<email>bdrewery@FreeBSD.org</email>
</author>
<published>2015-11-25T19:44:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b791fbe6302023b0cf00807865059c8f016fe5dc'/>
<id>urn:sha1:b791fbe6302023b0cf00807865059c8f016fe5dc</id>
<content type='text'>
Tracking these leads to situations where meta mode will consider the
file to be out of date if /bin/sh or /bin/ln are newer than the source
file.  There's no reason for meta mode to do this as make is already
handling the rebuild dependency fine.

Sponsored by:	EMC / Isilon Storage Division
</content>
</entry>
<entry>
<title>Fix ld not respecting --sysroot.</title>
<updated>2015-11-24T00:49:29Z</updated>
<author>
<name>Bryan Drewery</name>
<email>bdrewery@FreeBSD.org</email>
</author>
<published>2015-11-24T00:49:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8b2b71b415450d1ad4c9b56cec424c702020bf93'/>
<id>urn:sha1:8b2b71b415450d1ad4c9b56cec424c702020bf93</id>
<content type='text'>
ld(1) uses the /usr/libdata/ldscripts when linking. These scripts add in the
default search paths of /lib and /usr/lib via 'SEARCH_DIR("DIR")'. These
need to be prefixed by '=' so that the --sysroot flag is respected. This
is not a problem with buildworld since the TOOLS_PREFIX is baked into the
cross-ld. However it is a problem when trying to use ld(1) with --sysroot
anywhere else as it ends up still reading /lib and /usr/lib despite --sysroot.

The default --sysroot (TARGET_SYSTEM_ROOT) is '/' for /usr/bin/ld.

I found this while building with META MODE with uses only --sysroot with
/usr/bin/ld, and found that libraries that I had not built in its sysroot
directory were leaking in. This didn't happen with ports binutils either.  This
would also impact external compiler support.

Reviewed by:	bapt, brooks
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D4262
</content>
</entry>
</feed>
