Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:danci1973:openSUSE_12.2
glibc
glibc-2.16-ld-audit-ifunc.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File glibc-2.16-ld-audit-ifunc.patch of Package glibc
Bug: 793619 libc:2e64d2659d3edaebc792ac596a9863f1626e5c25 2012-11-14 H.J. Lu <hongjiu.lu@intel.com> [BZ #14831] * elf/Makefile (tests): Add tst-audit8. ($(objpfx)tst-audit8): Also depend on $(common-objpfx)math/libm.so. ($(objpfx)tst-audit8.out): New target. (tst-audit8-ENV): New variable. * elf/dl-runtime.c (_dl_profile_fixup): Call _dl_fixup to skip audit if l_reloc_result is NULL. (ELF_MACHINE_RUNTIME_FIXUP_PARAMS): Issue an error if it isn't defined and ELF_MACHINE_RUNTIME_FIXUP_ARGS is defined. * elf/tst-audit8.c: New file. Index: glibc-2.15/elf/Makefile =================================================================== --- glibc-2.15.orig/elf/Makefile 2012-12-10 16:49:47.374771055 +0100 +++ glibc-2.15/elf/Makefile 2012-12-10 16:51:51.554897395 +0100 @@ -228,7 +228,7 @@ tests += loadtest restest1 preloadtest l tst-dlmodcount tst-dlopenrpath tst-deep1 \ tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \ unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \ - tst-audit1 tst-audit2 \ + tst-audit1 tst-audit2 tst-audit8 \ tst-stackguard1 tst-addr1 tst-thrlock \ tst-unique1 tst-unique2 tst-unique3 tst-unique4 \ tst-initorder tst-initorder2 tst-relsort1 @@ -1074,6 +1074,10 @@ $(objpfx)tst-audit7: $(objpfx)tst-auditm $(objpfx)tst-audit7.out: $(objpfx)tst-auditmod7b.so tst-audit7-ENV = LD_AUDIT=$(objpfx)tst-auditmod7b.so +$(objpfx)tst-audit8: $(common-objpfx)math/libm.so +$(objpfx)tst-audit8.out: $(objpfx)tst-auditmod1.so +tst-audit8-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so + $(objpfx)tst-global1: $(libdl) $(objpfx)tst-global1.out: $(objpfx)testobj6.so $(objpfx)testobj2.so Index: glibc-2.15/elf/dl-runtime.c =================================================================== --- glibc-2.15.orig/elf/dl-runtime.c 2012-06-28 14:12:16.000000000 +0200 +++ glibc-2.15/elf/dl-runtime.c 2012-12-10 16:51:51.554897395 +0100 @@ -169,6 +169,26 @@ _dl_profile_fixup ( { void (*mcount_fct) (ElfW(Addr), ElfW(Addr)) = INTUSE(_dl_mcount); + if (l->l_reloc_result == NULL) + { + /* BZ #14843: ELF_DYNAMIC_RELOCATE is called before l_reloc_result + is allocated. We will get here if ELF_DYNAMIC_RELOCATE calls a + resolver function to resolve an IRELATIVE relocation and that + resolver calls a function that is not yet resolved (lazy). For + example, the resolver in x86-64 libm.so calls __get_cpu_features + defined in libc.so. Skip audit and resolve the external function + in this case. */ + *framesizep = -1; + return _dl_fixup ( +# ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS +# ifndef ELF_MACHINE_RUNTIME_FIXUP_PARAMS +# error Please define ELF_MACHINE_RUNTIME_FIXUP_PARAMS. +# endif + ELF_MACHINE_RUNTIME_FIXUP_PARAMS, +# endif + l, reloc_arg); + } + /* This is the address in the array where we store the result of previous relocations. */ struct reloc_result *reloc_result = &l->l_reloc_result[reloc_index]; Index: glibc-2.15/elf/tst-audit8.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.15/elf/tst-audit8.c 2012-12-10 16:51:51.554897395 +0100 @@ -0,0 +1 @@ +#include "../io/pwd.c"
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor