diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2004-04-20 14:50:22 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2004-04-20 14:50:22 +0000 |
commit | a664545d5360f7e57d9f89ba333c26629bef1685 (patch) | |
tree | 2035032c47a5d6cc31642106c5ae58da99c0c757 /ld/testsuite/ld-elfweak/elfweak.exp | |
parent | 6482c264f4a6d239f2abd356e09ae465e74efeb1 (diff) | |
download | gdb-a664545d5360f7e57d9f89ba333c26629bef1685.zip gdb-a664545d5360f7e57d9f89ba333c26629bef1685.tar.gz gdb-a664545d5360f7e57d9f89ba333c26629bef1685.tar.bz2 |
2004-04-20 H.J. Lu <hongjiu.lu@intel.com>
* ld-elfweak/elfweak.exp: Add an undefined weak size change
test.
* ld-elfweak/size.dat: New file.
* ld-elfweak/size_bar.c: Likewise.
* ld-elfweak/size_foo.c: Likewise.
* ld-elfweak/size_main.c: Likewise.
Diffstat (limited to 'ld/testsuite/ld-elfweak/elfweak.exp')
-rw-r--r-- | ld/testsuite/ld-elfweak/elfweak.exp | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/ld/testsuite/ld-elfweak/elfweak.exp b/ld/testsuite/ld-elfweak/elfweak.exp index 8fc6832..78b6358 100644 --- a/ld/testsuite/ld-elfweak/elfweak.exp +++ b/ld/testsuite/ld-elfweak/elfweak.exp @@ -287,7 +287,8 @@ proc build_lib {test libname objs dynsymexp} { return } - if {![objdump_dynsymstuff $objdump $tmpdir/$libname.so $srcdir/$subdir/$dynsymexp]} { + if {![string match "" $dynsymexp] \ + && ![objdump_dynsymstuff $objdump $tmpdir/$libname.so $srcdir/$subdir/$dynsymexp]} { fail $test return } @@ -465,3 +466,30 @@ build_exec "ELF weak data first DSO" foo "main1.o libbar1a.so libfoo1a.so" "-Wl, build_exec "ELF weak data last DSO" foo "libfoo1a.so main1.o libbar1a.so" "-Wl,-rpath,." weakdata weakdata.dsym "" build_exec "ELF weak data first DSO common" foo "main1.o libbar1a.so libfoo1b.so" "-Wl,-rpath,." weakdata weakdata.dsym "" build_exec "ELF weak data last DSO common" foo "libfoo1b.so main1.o libbar1a.so" "-Wl,-rpath,." weakdata weakdata.dsym "" + +if ![ld_compile "$CC $CFLAGS $picflag" $srcdir/$subdir/size_foo.c $tmpdir/size_foo.o] { + unresolved "ELF weak (size)" + return +} + +if ![ld_compile "$CC $CFLAGS $picflag" $srcdir/$subdir/size_bar.c $tmpdir/size_bar.o] { + unresolved "ELF weak (size)" + return +} + +build_lib "ELF DSO small bar (size)" libsize_bar "size_bar.o" "" +build_lib "ELF DSO foo with small bar (size)" libsize_foo "size_foo.o libsize_bar.so" "" + +if ![ld_compile "$CC $CFLAGS $picflag -DSIZE_BIG" $srcdir/$subdir/size_bar.c $tmpdir/size_bar.o] { + unresolved "ELF weak (size)" + return +} + +build_lib "ELF DSO big bar (size)" libsize_bar "size_bar.o" "" + +if ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/size_main.c $tmpdir/size_main.o] { + unresolved "ELF weak (size)" + return +} + +build_exec "ELF weak size" size_main "size_main.o libsize_foo.so libsize_bar.so" "-Wl,-rpath,." size "" "" |