1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00
freebsd/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
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
pppoed
rbootd rbootd: use NULL instead of zero for pointers. 2016-04-18 15:05:48 +00:00
revnetgroup
rlogind DIRDEPS_BUILD: Update dependencies 2016-06-14 16:55:05 +00:00
rpc.rquotad
rpc.rstatd Update dependencies after r291406 added libelf to libkvm. 2015-12-01 05:18:48 +00:00
rpc.rusersd
rpc.rwalld
rpc.sprayd
rshd DIRDEPS_BUILD: Update dependencies 2016-06-14 16:55:05 +00:00
rtld-aout
rtld-elf rtld: do not rely on a populated GOT on amd64 2017-01-16 14:49:29 +00:00
save-entropy
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
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
tftpd Conditionalize all code that uses tcpd.h behind LIBWRAP guard 2017-01-06 04:27:07 +00:00
ulog-helper
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
Makefile.i386
Makefile.inc
Makefile.pc98