diff options
author | Carlos O'Donell <carlos@redhat.com> | 2016-09-29 21:54:31 -0400 |
---|---|---|
committer | Carlos O'Donell <carlos@redhat.com> | 2016-09-30 01:36:56 -0400 |
commit | d61ef7352b0026d9eeaf457dbfbb2e3fd8401e92 (patch) | |
tree | 798532132a35db0935de8cff3f10e8642e3457bb /elf/Makefile | |
parent | 29cb9293326a27576965a40d50a898ee660dff81 (diff) | |
download | glibc-d61ef7352b0026d9eeaf457dbfbb2e3fd8401e92.zip glibc-d61ef7352b0026d9eeaf457dbfbb2e3fd8401e92.tar.gz glibc-d61ef7352b0026d9eeaf457dbfbb2e3fd8401e92.tar.bz2 |
Bug 20292 - Simplify and test _dl_addr_inside_object
The function _dl_addr_inside_object is simplified by removing
the conditional 'reladdr - l->l_phdr[n].p_vaddr >= 0' which is
always true. The function is refactored into it's own object file
and a unit test added to verify the correct behaviour of the
function.
Diffstat (limited to 'elf/Makefile')
-rw-r--r-- | elf/Makefile | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/elf/Makefile b/elf/Makefile index 97f0ec2..caffd92 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -23,7 +23,7 @@ include ../Makeconfig headers = elf.h bits/elfclass.h link.h bits/link.h routines = $(all-dl-routines) dl-support dl-iteratephdr \ - dl-addr enbl-secure dl-profstub \ + dl-addr dl-addr-obj enbl-secure dl-profstub \ dl-origin dl-libc dl-sym dl-tsd dl-sysdep # The core dynamic linking functions are in libc for the static and @@ -319,6 +319,16 @@ tests-special += $(objpfx)tst-prelink-cmp.out endif endif +# The test requires shared _and_ PIE because the executable +# unit test driver must be able to link with the shared object +# that is going to eventually go into an installed DSO. +ifeq (yesyes,$(have-fpie)$(build-shared)) +tests += tst-_dl_addr_inside_object +tests-pie += tst-_dl_addr_inside_object +$(objpfx)tst-_dl_addr_inside_object: $(objpfx)dl-addr-obj.os +CFLAGS-tst-_dl_addr_inside_object.c += $(PIE-ccflag) +endif + include ../Rules ifeq (yes,$(build-shared)) |