diff options
author | ljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-03 16:53:35 +0000 |
---|---|---|
committer | ljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-03 16:53:35 +0000 |
commit | 1602764e229df36b9eec13b6bb88ed2a27f29fb0 (patch) | |
tree | c93e5f2d1c35d6d9c604e53ea6a817bd0b77f952 /boehm-gc | |
parent | 60b8aedaf675746fa97711694ff868889b1acf7e (diff) | |
download | gcc-1602764e229df36b9eec13b6bb88ed2a27f29fb0.tar.gz |
2009-09-03 Loren J. Rittle <ljrittle@acm.org>
* dyn_load.c (HAVE_DL_ITERATE_PHDR): Break definition from use.
Define for FreeBSD 7.0+.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151387 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc')
-rw-r--r-- | boehm-gc/ChangeLog | 5 | ||||
-rw-r--r-- | boehm-gc/dyn_load.c | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog index 11ee0e61b5b..8bd2012ba34 100644 --- a/boehm-gc/ChangeLog +++ b/boehm-gc/ChangeLog @@ -1,3 +1,8 @@ +2009-09-03 Loren J. Rittle <ljrittle@acm.org> + + * dyn_load.c (HAVE_DL_ITERATE_PHDR): Break definition from use. + Define for FreeBSD 7.0+. + 2009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * configure.ac (AC_PREREQ): Bump to 2.64. diff --git a/boehm-gc/dyn_load.c b/boehm-gc/dyn_load.c index f205be2823d..200abde7810 100644 --- a/boehm-gc/dyn_load.c +++ b/boehm-gc/dyn_load.c @@ -400,6 +400,16 @@ GC_bool GC_register_main_static_data() /* It may still not be available in the library on the target system. */ /* Thus we also treat it as a weak symbol. */ #define HAVE_DL_ITERATE_PHDR +#pragma weak dl_iterate_phdr +#endif + +# if (defined(FREEBSD) && __FreeBSD__ >= 7) +/* On the FreeBSD system, any target system at major version 7 shall */ +/* have dl_iterate_phdr; therefore, we need not make it weak as above. */ +#define HAVE_DL_ITERATE_PHDR +#endif + +#if defined(HAVE_DL_ITERATE_PHDR) static int GC_register_dynlib_callback(info, size, ptr) struct dl_phdr_info * info; @@ -441,8 +451,6 @@ static int GC_register_dynlib_callback(info, size, ptr) /* Return TRUE if we succeed, FALSE if dl_iterate_phdr wasn't there. */ -#pragma weak dl_iterate_phdr - GC_bool GC_register_dynamic_libraries_dl_iterate_phdr() { if (dl_iterate_phdr) { |