mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
3e4b9ad009
commit
6656fda37b
|
|
@ -1,3 +1,10 @@
|
||||||
|
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).
|
||||||
|
|
||||||
2008-01-26 Richard Sandiford <rsandifo@nildram.co.uk>
|
2008-01-26 Richard Sandiford <rsandifo@nildram.co.uk>
|
||||||
|
|
||||||
* include/private/gcconfig.h (HBLKSIZE): Define for MIPS.
|
* include/private/gcconfig.h (HBLKSIZE): Define for MIPS.
|
||||||
|
|
|
||||||
|
|
@ -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;
|
const struct GC_MACH_SECTION *sec;
|
||||||
if (GC_no_dls) return;
|
if (GC_no_dls) return;
|
||||||
for(i=0;i<sizeof(GC_dyld_sections)/sizeof(GC_dyld_sections[0]);i++) {
|
for(i=0;i<sizeof(GC_dyld_sections)/sizeof(GC_dyld_sections[0]);i++) {
|
||||||
# if defined (__LP64__)
|
|
||||||
sec = getsectbynamefromheader_64(
|
sec = GC_GETSECTBYNAME (hdr, GC_dyld_sections[i].seg,
|
||||||
# else
|
GC_dyld_sections[i].sect);
|
||||||
sec = getsectbynamefromheader(
|
|
||||||
# endif
|
|
||||||
hdr,GC_dyld_sections[i].seg,GC_dyld_sections[i].sect);
|
|
||||||
if(sec == NULL || sec->size == 0) continue;
|
if(sec == NULL || sec->size == 0) continue;
|
||||||
start = slide + sec->addr;
|
start = slide + sec->addr;
|
||||||
end = start + sec->size;
|
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;
|
unsigned long start,end,i;
|
||||||
const struct GC_MACH_SECTION *sec;
|
const struct GC_MACH_SECTION *sec;
|
||||||
for(i=0;i<sizeof(GC_dyld_sections)/sizeof(GC_dyld_sections[0]);i++) {
|
for(i=0;i<sizeof(GC_dyld_sections)/sizeof(GC_dyld_sections[0]);i++) {
|
||||||
# if defined (__LP64__)
|
sec = GC_GETSECTBYNAME (hdr, GC_dyld_sections[i].seg,
|
||||||
sec = getsectbynamefromheader_64(
|
GC_dyld_sections[i].sect);
|
||||||
# else
|
|
||||||
sec = getsectbynamefromheader(
|
|
||||||
# endif
|
|
||||||
hdr,GC_dyld_sections[i].seg,GC_dyld_sections[i].sect);
|
|
||||||
if(sec == NULL || sec->size == 0) continue;
|
if(sec == NULL || sec->size == 0) continue;
|
||||||
start = slide + sec->addr;
|
start = slide + sec->addr;
|
||||||
end = start + sec->size;
|
end = start + sec->size;
|
||||||
|
|
|
||||||
|
|
@ -472,16 +472,18 @@ extern GC_warn_proc GC_current_warn_proc;
|
||||||
# if defined(POWERPC)
|
# if defined(POWERPC)
|
||||||
# if CPP_WORDSZ == 32
|
# if CPP_WORDSZ == 32
|
||||||
# define GC_THREAD_STATE_T ppc_thread_state_t
|
# define GC_THREAD_STATE_T ppc_thread_state_t
|
||||||
# define GC_MACH_THREAD_STATE PPC_THREAD_STATE
|
# define GC_MACH_THREAD_STATE PPC_THREAD_STATE
|
||||||
# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT
|
# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT
|
||||||
# define GC_MACH_HEADER mach_header
|
# define GC_MACH_HEADER mach_header
|
||||||
# define GC_MACH_SECTION section
|
# define GC_MACH_SECTION section
|
||||||
|
# define GC_GETSECTBYNAME getsectbynamefromheader
|
||||||
# else
|
# else
|
||||||
# define GC_THREAD_STATE_T ppc_thread_state64_t
|
# define GC_THREAD_STATE_T ppc_thread_state64_t
|
||||||
# define GC_MACH_THREAD_STATE PPC_THREAD_STATE64
|
# define GC_MACH_THREAD_STATE PPC_THREAD_STATE64
|
||||||
# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE64_COUNT
|
# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE64_COUNT
|
||||||
# define GC_MACH_HEADER mach_header_64
|
# define GC_MACH_HEADER mach_header_64
|
||||||
# define GC_MACH_SECTION section_64
|
# define GC_MACH_SECTION section_64
|
||||||
|
# define GC_GETSECTBYNAME getsectbynamefromheader_64
|
||||||
# endif
|
# endif
|
||||||
# elif defined(I386) || defined(X86_64)
|
# elif defined(I386) || defined(X86_64)
|
||||||
# if CPP_WORDSZ == 32
|
# if CPP_WORDSZ == 32
|
||||||
|
|
@ -490,12 +492,14 @@ extern GC_warn_proc GC_current_warn_proc;
|
||||||
# define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE32_COUNT
|
# define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE32_COUNT
|
||||||
# define GC_MACH_HEADER mach_header
|
# define GC_MACH_HEADER mach_header
|
||||||
# define GC_MACH_SECTION section
|
# define GC_MACH_SECTION section
|
||||||
|
# define GC_GETSECTBYNAME getsectbynamefromheader
|
||||||
# else
|
# else
|
||||||
# define GC_THREAD_STATE_T x86_thread_state64_t
|
# define GC_THREAD_STATE_T x86_thread_state64_t
|
||||||
# define GC_MACH_THREAD_STATE x86_THREAD_STATE64
|
# define GC_MACH_THREAD_STATE x86_THREAD_STATE64
|
||||||
# define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE64_COUNT
|
# define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE64_COUNT
|
||||||
# define GC_MACH_HEADER mach_header_64
|
# define GC_MACH_HEADER mach_header_64
|
||||||
# define GC_MACH_SECTION section_64
|
# define GC_MACH_SECTION section_64
|
||||||
|
# define GC_GETSECTBYNAME getsectbynamefromheader_64
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# error define GC_THREAD_STATE_T
|
# error define GC_THREAD_STATE_T
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue