diff options
author | Andreas Tobler <a.tobler@schweiz.org> | 2008-02-19 21:29:26 +0000 |
---|---|---|
committer | Andreas Tobler <andreast@gcc.gnu.org> | 2008-02-19 22:29:26 +0100 |
commit | 6656fda37b7354784b395dffbdd4049c441b4e99 (patch) | |
tree | b5eb56b596e3b3c62b9334b31da2c0edbc70cc26 /boehm-gc/dyn_load.c | |
parent | 3e4b9ad009a7478ec9606983658f5c120e49e6c4 (diff) | |
download | gcc-6656fda37b7354784b395dffbdd4049c441b4e99.tar.gz |
dyn_load.c (GC_dyld_image_add): Remove ifdef clause and use the macro GC_GETSECTBYNAME instead.
2007-02-19 Andreas Tobler <a.tobler@schweiz.org>
* dyn_load.c (GC_dyld_image_add): Remove ifdef clause and use the macro
GC_GETSECTBYNAME instead.
* include/private/gc_priv.h: Define GC_GETSECTBYNAME according to the
architecture (Darwin).
From-SVN: r132452
Diffstat (limited to 'boehm-gc/dyn_load.c')
-rw-r--r-- | boehm-gc/dyn_load.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/boehm-gc/dyn_load.c b/boehm-gc/dyn_load.c index 27c1b07387a..f205be2823d 100644 --- a/boehm-gc/dyn_load.c +++ b/boehm-gc/dyn_load.c @@ -1168,12 +1168,9 @@ static void GC_dyld_image_add(const struct GC_MACH_HEADER *hdr, intptr_t slide) const struct GC_MACH_SECTION *sec; if (GC_no_dls) return; for(i=0;i<sizeof(GC_dyld_sections)/sizeof(GC_dyld_sections[0]);i++) { -# if defined (__LP64__) - sec = getsectbynamefromheader_64( -# else - sec = getsectbynamefromheader( -# endif - hdr,GC_dyld_sections[i].seg,GC_dyld_sections[i].sect); + + sec = GC_GETSECTBYNAME (hdr, GC_dyld_sections[i].seg, + GC_dyld_sections[i].sect); if(sec == NULL || sec->size == 0) continue; start = slide + sec->addr; end = start + sec->size; @@ -1194,12 +1191,8 @@ static void GC_dyld_image_remove(const struct GC_MACH_HEADER *hdr, unsigned long start,end,i; const struct GC_MACH_SECTION *sec; for(i=0;i<sizeof(GC_dyld_sections)/sizeof(GC_dyld_sections[0]);i++) { -# if defined (__LP64__) - sec = getsectbynamefromheader_64( -# else - sec = getsectbynamefromheader( -# endif - hdr,GC_dyld_sections[i].seg,GC_dyld_sections[i].sect); + sec = GC_GETSECTBYNAME (hdr, GC_dyld_sections[i].seg, + GC_dyld_sections[i].sect); if(sec == NULL || sec->size == 0) continue; start = slide + sec->addr; end = start + sec->size; |