freebsd-skq/contrib
emaste 9ed40b5bee elfcopy: delete filter_reloc, it is broken and unnecessary
elfcopy contained logic to filter individual relocations in STRIP_ALL
mode.  However, this is not valid; relocations emitted by the linker are
required, unless they apply to an entire section being removed (which is
handled by other logic in elfcopy).

Note that filter_reloc was also buggy: for RELA relocation sections it
operated on uninitialized rel.r_info resulting in invalid operation.

The logic most likely needs to be inverted: instead of removing
relocations because their associated symbols are being removed, we must
keep symbols referenced by relocations.  That said, in practice we do
not encounter this code path today: objects being stripped are either
dynamically linked binaries which retain .dynsym, or static binaries
with no relocations.

Just remove filter_reloc.  This fixes certain cases including statically
linked binaries containing ifuncs.  Stripping binaries with relocations
referencing removed symbols was already broken, and after this change
may still be broken in a different way.

PR:		232176
Reviewed by:	kaiw, kib, markj
Approved by:	re (rgrimes)
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17519
2018-10-13 21:26:07 +00:00
..
amd Fix a broken "SEE ALSO" section of hlfsd(8). 2018-08-14 20:33:48 +00:00
apr
apr-util
atf
binutils Add deprecation notice to objdump man page 2018-06-15 17:03:49 +00:00
blacklist Document signal handling in blacklistd(8). 2018-10-05 16:52:21 +00:00
bmake Cross-reference style.Makefile(5) from make(1) and make.conf(5). 2018-09-27 12:20:32 +00:00
bsnmp Make libbsnmp buildable. 2018-09-19 06:39:10 +00:00
byacc
bzip2
com_err
compiler-rt Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 2018-06-29 17:51:35 +00:00
cortex-strings
dialog
diff
dma Make dma(8) buildable. 2018-09-19 06:42:05 +00:00
dtc
ee
elftoolchain elfcopy: delete filter_reloc, it is broken and unnecessary 2018-10-13 21:26:07 +00:00
expat
file file: update to 5.34 2018-08-08 01:33:36 +00:00
flex Terminate filter_create_ext() args with NULL, not 0. 2018-08-08 22:45:30 +00:00
gcc Fix GCC 4.2.1 to honor --sysroot for includes. 2018-06-27 18:14:33 +00:00
gcclibs
gdb
gdtoa
gperf
hyperv/tools
ipfilter
jemalloc Update jemalloc to version 5.1.0. 2018-05-11 00:32:31 +00:00
ldns Regenerate: remove GOST, enable DANE-TA now that we have OpenSSL 1.1.1. 2018-10-11 08:14:31 +00:00
ldns-host
less MFV r329552: less v530. 2018-02-19 05:10:22 +00:00
libarchive MFV r338797: 2018-09-20 11:44:36 +00:00
libbegemot Update bsnmp to version 1.13. This does not bring user-visible changes. 2018-07-03 08:44:40 +00:00
libc-pwcache
libc-vis
libc++ Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 2018-06-29 17:51:35 +00:00
libcxxrt
libdivsufsort
libevent libevent: eliminate in-tree usage of arc4random_addrandom 2018-09-25 17:41:48 +00:00
libexecinfo
libgnuregex
libpcap Re-apply r190640. 2018-05-31 09:11:21 +00:00
libstdc++
libucl
libxo Import libxo-0.9.0: 2018-05-23 01:20:31 +00:00
llvm lld: set sh_link and sh_info for .rela.plt sections 2018-10-11 13:19:17 +00:00
lua MFV r337586: lua: Update to 5.3.5 2018-08-14 18:58:01 +00:00
mandoc Import mandoc 1.14.4 2018-09-20 10:58:52 +00:00
mknod
mtree
ncurses
netbsd-tests Increase timeout for timedmutex_test:mutex2, timedmutex_test:mutex3 2018-08-06 15:55:58 +00:00
netcat
ngatm
ntp MFV r338092: ntp 4.2.8p12. 2018-08-21 02:38:07 +00:00
nvi
ofed Remove __DATE__ and __TIME__ from ibdiag_common.c, replacing with 2018-09-13 16:41:15 +00:00
one-true-awk
openbsm MFH r338661 through r339200. 2018-10-05 17:53:47 +00:00
opencsd/decoder Import OpenCSD -- an ARM CoreSight(tm) Trace Decode Library. 2018-04-04 12:55:31 +00:00
openpam Upgrade to OpenPAM Resedacea. 2017-05-05 13:31:25 +00:00
openresolv
opie
pam_modules/pam_passwdqc
pf Fix escaping, otherwise Dx gets translated as the macro for DragonFly. 2018-08-11 00:08:59 +00:00
pjdfstest
pnpinfo
processor-trace Import Intel Processor Trace decoder library from 2018-03-19 18:59:15 +00:00
sendmail Make sendmail work with OpenSSL 1.1 API. Taken from the ports tree. 2018-10-01 20:55:01 +00:00
serf MFV r339226 (peter): Record merge of serf-1.3.9. 2018-10-08 15:16:04 +00:00
smbfs Fix a stack overflow in mount_smbfs when hostname is too long. 2018-06-25 16:42:49 +00:00
sqlite3 Update private sqlite from sqlite3-3.20.0 to sqlite3-3.23.1 2018-05-08 04:51:15 +00:00
subversion Update svn-1.9.7 to 1.10.0. 2018-05-08 04:52:52 +00:00
tcp_wrappers Reduce the log level of tcpd_warn calls from ERR to WARNING. 2018-08-23 20:44:26 +00:00
tcpdump Fix for backends which doesn't support capsicum. 2018-09-12 10:09:59 +00:00
tcsh
telnet Make telnet(1) buildable. 2018-09-19 07:01:22 +00:00
tnftp Switch the default pager for most commands to less 2018-08-08 19:24:20 +00:00
traceroute
tzcode
tzdata Import tzdata 2018e 2018-05-04 10:17:27 +00:00
unbound Try harder to sanitize the environment before running configure. 2018-10-10 22:29:06 +00:00
unvis
vis
wpa For CID 1394785, add a comment explaining that global->event_buf is 2018-08-21 19:17:35 +00:00
xz MFV r333779: xz 5.2.4. 2018-05-18 06:10:16 +00:00
zlib