mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-12-04 10:24:13 +00:00
2001-09-14 H.J. Lu <hjl@gnu.org>
* ld-elfweak/bar.c: Updated. * ld-elfweak/bar1a.c: Likewise. * ld-elfweak/main.c: Likewise. * ld-elfweak/main1.c: Likewise. * ld-elfweak/elfweak.exp: Likewise. * ld-elfweak/weakdata.dsym: Updated.
This commit is contained in:
parent
920acd6218
commit
0c52a746f7
@ -1,3 +1,12 @@
|
||||
2001-09-14 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* ld-elfweak/bar.c: Updated.
|
||||
* ld-elfweak/bar1a.c: Likewise.
|
||||
* ld-elfweak/main.c: Likewise.
|
||||
* ld-elfweak/main1.c: Likewise.
|
||||
* ld-elfweak/elfweak.exp: Likewise.
|
||||
* ld-elfweak/weakdata.dsym: Updated.
|
||||
|
||||
2001-09-11 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* ld-elfweak/elfweak.exp (build_lib): Take a list of object
|
||||
|
@ -1,9 +1,16 @@
|
||||
#include <stdio.h>
|
||||
|
||||
extern void foo ();
|
||||
extern void foobar ();
|
||||
|
||||
void
|
||||
foo ()
|
||||
{
|
||||
printf ("strong foo\n");
|
||||
}
|
||||
|
||||
void
|
||||
foobar ()
|
||||
{
|
||||
foo ();
|
||||
}
|
||||
|
@ -1,6 +1,23 @@
|
||||
#pragma weak deallocate_foo
|
||||
#include <stdio.h>
|
||||
|
||||
int deallocate_foo = 1;
|
||||
extern int deallocate_foo;
|
||||
|
||||
extern int * bar ();
|
||||
extern int * foo ();
|
||||
extern void abort ();
|
||||
extern void foobar ();
|
||||
|
||||
void
|
||||
foobar ()
|
||||
{
|
||||
if (&deallocate_foo != bar () || &deallocate_foo != foo ())
|
||||
abort ();
|
||||
|
||||
if (deallocate_foo)
|
||||
printf ("weak deallocate_foo\n");
|
||||
else
|
||||
printf ("strong deallocate_foo\n");
|
||||
}
|
||||
|
||||
int *
|
||||
bar()
|
||||
|
@ -434,6 +434,11 @@ if {![ld_link $ld $tmpdir/libfoo1b.so "$shared $tmpdir/foo1b.o"]} {
|
||||
return
|
||||
}
|
||||
|
||||
if {![ld_link $ld $tmpdir/libbar1a.so "$shared $tmpdir/bar1a.o $tmpdir/libfoo1a.so"]} {
|
||||
fail "ELF weak"
|
||||
return
|
||||
}
|
||||
|
||||
build_lib "ELF DSO weak func first" libfoo "foo.o bar.o" dso.dsym
|
||||
build_lib "ELF DSO weak func last" libfoo "bar.o foo.o" dso.dsym
|
||||
setup_xfail "*-*-*"
|
||||
@ -450,22 +455,22 @@ build_exec "ELF weak func last DSO" foo "libbar.so main.o" "-rpath ." weak weak.
|
||||
build_lib "ELF DSO weak data first" libfoo "bar1a.o foo1a.o" dsodata.dsym
|
||||
build_lib "ELF DSO weak data last" libfoo "foo1a.o bar1a.o" dsodata.dsym
|
||||
setup_xfail "*-*-*"
|
||||
build_lib "ELF DSO weak data first DSO" libfoo "bar1a.o libfoo1a.so" dsowdata.dsym
|
||||
build_lib "ELF DSO weak data first DSO" libfoo "main1.o libfoo1a.so" dsowdata.dsym
|
||||
setup_xfail "*-*-*"
|
||||
build_lib "ELF DSO weak data last DSO" libfoo "libfoo1a.so bar1a.o" dsowdata.dsym
|
||||
build_lib "ELF DSO weak data last DSO" libfoo "libfoo1a.so main1.o" dsowdata.dsym
|
||||
setup_xfail "*-*-*"
|
||||
build_lib "ELF DSO weak data first DSO common" libfoo "bar1a.o libfoo1b.so" dsowdata.dsym
|
||||
build_lib "ELF DSO weak data first DSO common" libfoo "main1.o libfoo1b.so" dsowdata.dsym
|
||||
setup_xfail "*-*-*"
|
||||
build_lib "ELF DSO weak data last DSO common" libfoo "libfoo1b.so bar1a.o" dsowdata.dsym
|
||||
build_lib "ELF DSO weak data last DSO common" libfoo "libfoo1b.so main1.o" dsowdata.dsym
|
||||
build_exec "ELF weak data first" foo "main1.o bar1a.o foo1a.o" "" strongdata "" strongdata.sym
|
||||
build_exec "ELF weak data last" foo "foo1a.o main1.o bar1a.o" "" strongdata "" strongdata.sym
|
||||
build_exec "ELF weak data first common" foo "main1.o bar1a.o foo1b.o" "" strongdata "" strongcomm.sym
|
||||
build_exec "ELF weak data last common" foo "foo1b.o main1.o bar1a.o" "" strongdata "" strongcomm.sym
|
||||
setup_xfail "*-*-*"
|
||||
build_exec "ELF weak data first DSO" foo "main1.o bar1a.o libfoo1a.so" "-rpath ." weakdata weakdata.dsym ""
|
||||
build_exec "ELF weak data first DSO" foo "main1.o libbar1a.so libfoo1a.so" "-rpath ." weakdata weakdata.dsym ""
|
||||
setup_xfail "*-*-*"
|
||||
build_exec "ELF weak data last DSO" foo "libfoo1a.so main1.o bar1a.o" "-rpath ." weakdata weakdata.dsym ""
|
||||
build_exec "ELF weak data last DSO" foo "libfoo1a.so main1.o libbar1a.so" "-rpath ." weakdata weakdata.dsym ""
|
||||
setup_xfail "*-*-*"
|
||||
build_exec "ELF weak data first DSO common" foo "main1.o bar1a.o libfoo1b.so" "-rpath ." weakdata weakdata.dsym ""
|
||||
build_exec "ELF weak data first DSO common" foo "main1.o libbar1a.so libfoo1b.so" "-rpath ." weakdata weakdata.dsym ""
|
||||
setup_xfail "*-*-*"
|
||||
build_exec "ELF weak data last DSO common" foo "libfoo1b.so main1.o bar1a.o" "-rpath ." weakdata weakdata.dsym ""
|
||||
build_exec "ELF weak data last DSO common" foo "libfoo1b.so main1.o libbar1a.so" "-rpath ." weakdata weakdata.dsym ""
|
||||
|
@ -3,6 +3,7 @@
|
||||
#pragma weak foo
|
||||
|
||||
extern void foo ();
|
||||
extern void foobar ();
|
||||
|
||||
void
|
||||
foo ()
|
||||
@ -13,6 +14,6 @@ foo ()
|
||||
int
|
||||
main ()
|
||||
{
|
||||
foo ();
|
||||
foobar ();
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,22 +1,11 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#pragma weak deallocate_foo
|
||||
int deallocate_foo = 1;
|
||||
|
||||
extern int * bar ();
|
||||
extern int * foo ();
|
||||
extern void abort ();
|
||||
extern void foobar ();
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if (&deallocate_foo != bar () || &deallocate_foo != foo ())
|
||||
abort ();
|
||||
|
||||
if (deallocate_foo)
|
||||
printf ("weak deallocate_foo\n");
|
||||
else
|
||||
printf ("strong deallocate_foo\n");
|
||||
|
||||
foobar ();
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,2 +1 @@
|
||||
[0-9a-f]*[ ]+w[ ]+DO[ ]+.data[ ]+[0-9a-f]*[ ]+(Base[ ]+|[ ]*)deallocate_foo
|
||||
[0-9a-f]*[ ]+DF[ ]+\*UND\*[ ]+[0-9a-f]*[ ]+(Base[ ]+|[ ]*)foo
|
||||
|
Loading…
Reference in New Issue
Block a user