about summary refs log tree commit diff
path: root/elf/Makefile
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2018-09-25 11:11:27 +0200
committerAndreas Schwab <schwab@suse.de>2018-10-30 12:07:25 +0100
commit2dd12baa045f25c52b30a34b10f72d51f2605413 (patch)
tree0b6533d453252b050dcf19f052a1ccb4d6bf46cb /elf/Makefile
parentfec8bb7ca93d66cd2b019cfebcee6b3e6560ea36 (diff)
downloadglibc-2dd12baa045f25c52b30a34b10f72d51f2605413.tar.gz
glibc-2dd12baa045f25c52b30a34b10f72d51f2605413.tar.xz
glibc-2dd12baa045f25c52b30a34b10f72d51f2605413.zip
RISC-V: properly terminate call chain (bug 23125)
Mark the ra register as undefined in _start, so that unwinding through
main works correctly.  Also, don't use a tail call so that ra points after
the call to __libc_start_main, not after the previous call.
Diffstat (limited to 'elf/Makefile')
-rw-r--r--elf/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/elf/Makefile b/elf/Makefile
index e86874492e..d72e7b67f6 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -187,7 +187,7 @@ tests += restest1 preloadtest loadfail multiload origtest resolvfail \
 	 tst-nodelete2 tst-audit11 tst-audit12 tst-dlsym-error tst-noload \
 	 tst-latepthread tst-tls-manydynamic tst-nodelete-dlclose \
 	 tst-debug1 tst-main1 tst-absolute-sym tst-absolute-zero tst-big-note \
-	 tst-unwind-ctor
+	 tst-unwind-ctor tst-unwind-main
 #	 reldep9
 tests-internal += loadtest unload unload2 circleload1 \
 	 neededtest neededtest2 neededtest3 neededtest4 \
@@ -1495,3 +1495,5 @@ $(objpfx)tst-libc_dlvsym-static.out: $(objpfx)tst-libc_dlvsym-dso.so
 $(objpfx)tst-big-note: $(objpfx)tst-big-note-lib.so
 
 $(objpfx)tst-unwind-ctor: $(objpfx)tst-unwind-ctor-lib.so
+
+CFLAGS-tst-unwind-main.c += -funwind-tables