freebsd-dev/libexec
Ed Maste ebf8934652 rtld: do not rely on a populated GOT on amd64
On rela architectures GNU BFD ld and gold store the relocation addend
in GOT entries (in addition to the relocation's r_addend field).
rtld previously relied on this to access its own _DYNAMIC symbol in
order to apply its own relocations.

However, recording addends in the GOT is not specified by the ABI,
and some versions of LLVM's LLD linker leave the GOT uninitialized on
rela architectures.

BFD ld does not populate the GOT on sparc64, and sparc64 rtld has a
machine-dependent rtld_dynamic_addr() function that returns the
_DYNAMIC address. Use the same approach on amd64, obtaining the %rip-
relative _DYNAMIC address following a suggestion from Rafael Espíndola.

Architectures other than amd64 should be addressed in future work.

PR:		214972
Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D9180
2017-01-16 14:49:29 +00:00
..
atf Use SRCTOP instead of the longhand version for defining the path to contrib/atf 2016-09-20 16:24:22 +00:00
atrun Add missing files to 'at' and 'rcmds' packages. 2016-02-05 03:20:27 +00:00
blacklistd-helper DIRDEPS_BUILD: Connect new directories and update dependencies. 2016-06-03 19:25:30 +00:00
bootpd Restore some comments in previous commit. 2016-04-12 18:24:02 +00:00
comsat Add META_MODE support. 2015-06-13 19:20:56 +00:00
dma Import Dragonfly Mail Agent snapshort from 20160806 aka v0.11+ 2016-08-20 16:36:05 +00:00
fingerd DIRDEPS_BUILD: Update dependencies 2016-06-14 16:55:05 +00:00
ftpd Fix build when WITHOUT_BLACKLIST=yes is specified 2016-11-12 03:07:41 +00:00
getty Missing tab. 2016-02-27 02:11:00 +00:00
hyperv META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
mail.local MFH 2016-03-02 16:14:46 +00:00
makewhatis.local Fix installation of makewhatis.local(1) since r283777. 2016-02-18 00:26:21 +00:00
mknetid Add META_MODE support. 2015-06-13 19:20:56 +00:00
pppoed Add META_MODE support. 2015-06-13 19:20:56 +00:00
rbootd rbootd: use NULL instead of zero for pointers. 2016-04-18 15:05:48 +00:00
revnetgroup Add META_MODE support. 2015-06-13 19:20:56 +00:00
rlogind DIRDEPS_BUILD: Update dependencies 2016-06-14 16:55:05 +00:00
rpc.rquotad Add META_MODE support. 2015-06-13 19:20:56 +00:00
rpc.rstatd Update dependencies after r291406 added libelf to libkvm. 2015-12-01 05:18:48 +00:00
rpc.rusersd Add META_MODE support. 2015-06-13 19:20:56 +00:00
rpc.rwalld Add META_MODE support. 2015-06-13 19:20:56 +00:00
rpc.sprayd Add META_MODE support. 2015-06-13 19:20:56 +00:00
rshd DIRDEPS_BUILD: Update dependencies 2016-06-14 16:55:05 +00:00
rtld-aout More -Wmissing-variable-declarations fixes. 2012-10-19 14:49:42 +00:00
rtld-elf rtld: do not rely on a populated GOT on amd64 2017-01-16 14:49:29 +00:00
save-entropy Add META_MODE support. 2015-06-13 19:20:56 +00:00
smrsh MFH 2016-03-02 16:14:46 +00:00
talkd Don't use high precision clock for expiration as only second portion is 2016-12-26 17:23:09 +00:00
tcpd Use LIBEXECDIR for /usr/libexec. 2015-11-26 01:14:40 +00:00
telnetd Add META_MODE support. 2015-06-13 19:20:56 +00:00
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
tftp-proxy Add META_MODE support. 2015-06-13 19:20:56 +00:00
tftpd Conditionalize all code that uses tcpd.h behind LIBWRAP guard 2017-01-06 04:27:07 +00:00
ulog-helper Add META_MODE support. 2015-06-13 19:20:56 +00:00
ypxfr Reference the libc symbols ypresp_{allfn,data} instead of local symbols. 2016-10-16 19:12:22 +00:00
Makefile Separate BLACKLIST vs BLACKLIST_SUPPORT properly 2016-06-07 16:31:03 +00:00
Makefile.amd64 HYPERV isn't available on all architectures, but just on by default 2014-10-16 00:33:06 +00:00
Makefile.i386 HYPERV isn't available on all architectures, but just on by default 2014-10-16 00:33:06 +00:00
Makefile.inc
Makefile.pc98 Add an "empty" Makefile.pc98 because it doesn't need/want HYPERV. It 2014-10-16 14:08:59 +00:00