about summary refs log tree commit diff
path: root/sysdeps/hppa/dl-lookupcfg.h
diff options
context:
space:
mode:
authorJohn David Anglin <danglin@gcc.gnu.org>2017-12-02 14:43:28 -0500
committerJohn David Anglin <danglin@gcc.gnu.org>2017-12-02 14:43:28 -0500
commitb3f7fb12f5c490787d548ecc479920e608f6f904 (patch)
tree15f8efbcb6b8c29510e265cc0c1ef7f5904b3094 /sysdeps/hppa/dl-lookupcfg.h
parent800a496acbb8c43036b3832460220d4ecbbc22a4 (diff)
downloadglibc-b3f7fb12f5c490787d548ecc479920e608f6f904.tar.gz
glibc-b3f7fb12f5c490787d548ecc479920e608f6f904.tar.xz
glibc-b3f7fb12f5c490787d548ecc479920e608f6f904.zip
Handle __gmon_start__ as undefined weak on hppa.
	[BZ libc/19170]
	* sysdeps/hppa/crti.S: Declare PREINIT_FUNCTION weak_extern when
	PREINIT_FUNCTION_WEAK is nonzero.
	(gmon_initializer): New function.  Put procedure label for it in
	.init_array section.
	(_init): Don't call PREINIT_FUNCTION.
	* sysdeps/hppa/crtn.S (__gmon_start__): Remove.
	* sysdeps/hppa/dl-lookupcfg.h (DL_FIXUP_MAKE_VALUE): Create null fixup
	value when map argument is null.
Diffstat (limited to 'sysdeps/hppa/dl-lookupcfg.h')
-rw-r--r--sysdeps/hppa/dl-lookupcfg.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h
index 0b0ae85b5d..0b8f031823 100644
--- a/sysdeps/hppa/dl-lookupcfg.h
+++ b/sysdeps/hppa/dl-lookupcfg.h
@@ -73,7 +73,8 @@ void attribute_hidden _dl_unmap (struct link_map *map);
 
 /* Construct a fixup value from the address and linkmap */
 #define DL_FIXUP_MAKE_VALUE(map, addr) \
-   ((struct fdesc) { (addr), (map)->l_info[DT_PLTGOT]->d_un.d_ptr })
+  (map) ? ((struct fdesc) { (addr), (map)->l_info[DT_PLTGOT]->d_un.d_ptr }) \
+	: ((struct fdesc) { 0, 0 })
 
 /* Extract the code address from a fixup value */
 #define DL_FIXUP_VALUE_CODE_ADDR(value) ((value).ip)