diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-18 01:04:43 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-18 01:04:43 +0000 |
commit | 8fee6c5ba203062646a84ef04770c79ba2be0a6a (patch) | |
tree | 0a038d94cc4acd44c0926f011247f6b7969fa84b /boehm-gc/dyn_load.c | |
parent | 75ae025532a15d2842c5401959ef6775e3ebe550 (diff) | |
download | linaro-gcc-8fee6c5ba203062646a84ef04770c79ba2be0a6a.tar.gz linaro-gcc-8fee6c5ba203062646a84ef04770c79ba2be0a6a.tar.bz2 linaro-gcc-8fee6c5ba203062646a84ef04770c79ba2be0a6a.zip |
* Makefile.am, acinclude.m4, configure.in: Imported GC 6.0 and
merged local changes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44994 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/dyn_load.c')
-rw-r--r-- | boehm-gc/dyn_load.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/boehm-gc/dyn_load.c b/boehm-gc/dyn_load.c index 4f4ef51348d..508fd24179a 100644 --- a/boehm-gc/dyn_load.c +++ b/boehm-gc/dyn_load.c @@ -53,7 +53,7 @@ !(defined(ALPHA) && defined(OSF1)) && \ !defined(HPUX) && !(defined(LINUX) && defined(__ELF__)) && \ !defined(RS6000) && !defined(SCO_ELF) && \ - !(defined(NETBSD) && defined(__ELF__)) + !(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) --> We only know how to find data segments of dynamic libraries for the --> above. Additional SVR4 variants might not be too --> hard to add. @@ -243,7 +243,7 @@ void GC_register_dynamic_libraries() # endif /* SUNOS */ #if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \ - (defined(NETBSD) && defined(__ELF__)) + (defined(NETBSD) && defined(__ELF__)) || defined(HURD) #ifdef USE_PROC_FOR_LIBRARIES @@ -514,6 +514,10 @@ void GC_register_dynamic_libraries() #include <fcntl.h> #include <elf.h> #include <errno.h> +#include <signal.h> /* Only for the following test. */ +#ifndef _sigargs +# define IRIX6 +#endif extern void * GC_roots_present(); /* The type is a lie, since the real type doesn't make sense here, */ @@ -574,7 +578,8 @@ void GC_register_dynamic_libraries() if ((flags & (MA_BREAK | MA_STACK | MA_PHYS)) != 0) goto irrelevant; if ((flags & (MA_READ | MA_WRITE)) != (MA_READ | MA_WRITE)) goto irrelevant; - /* The latter test is empirically useless. Other than the */ + /* The latter test is empirically useless in very old Irix */ + /* versions. Other than the */ /* main data and stack segments, everything appears to be */ /* mapped readable, writable, executable, and shared(!!). */ /* This makes no sense to me. - HB */ @@ -587,7 +592,11 @@ void GC_register_dynamic_libraries() # endif /* MMAP_STACKS */ limit = start + addr_map[i].pr_size; - if (addr_map[i].pr_off == 0 && strncmp(start, ELFMAG, 4) == 0) { + /* The following seemed to be necessary for very old versions */ + /* of Irix, but it has been reported to discard relevant */ + /* segments under Irix 6.5. */ +# ifndef IRIX6 + if (addr_map[i].pr_off == 0 && strncmp(start, ELFMAG, 4) == 0) { /* Discard text segments, i.e. 0-offset mappings against */ /* executable files which appear to have ELF headers. */ caddr_t arg; @@ -614,7 +623,8 @@ void GC_register_dynamic_libraries() goto irrelevant; } } - } + } +# endif /* !IRIX6 */ GC_add_roots_inner(start, limit, TRUE); irrelevant: ; } |