aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/rtld.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index b88e1e12b0..38c7b051b1 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -132,7 +132,8 @@ _dl_start (void *arg)
/* This #define produces dynamic linking inline functions for
bootstrap relocation instead of general-purpose relocation. */
#define RTLD_BOOTSTRAP
-#define RESOLVE(sym, version, flags) bootstrap_map.l_addr
+#define RESOLVE(sym, version, flags) \
+ ((*(sym))->st_shndx == SHN_UNDEF ? 0 : bootstrap_map.l_addr)
#include "dynamic-link.h"
/* Figure out the run-time load address of the dynamic linker itself. */