* [patch] darwin cleanup
@ 2007-12-07 21:18 Andreas Tobler
2007-12-07 21:32 ` [patch] boehm-gc: " Andreas Tobler
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Tobler @ 2007-12-07 21:18 UTC (permalink / raw)
To: Java Patches, Boehm, Hans
[-- Attachment #1: Type: text/plain, Size: 403 bytes --]
Hi all,
this patch went already into the queue of boehm-gc, not yet ack'ed.
It does cleanup some sins I did earlier in my life.
Ok for trunk?
Andreas
2007-12-07 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).
[-- Attachment #2: darwin_gc_cleanup-20071207.diff --]
[-- Type: text/plain, Size: 3404 bytes --]
Index: dyn_load.c
===================================================================
--- dyn_load.c (revision 130663)
+++ dyn_load.c (working copy)
@@ -1168,12 +1168,9 @@
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 @@
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;
Index: include/private/gc_priv.h
===================================================================
--- include/private/gc_priv.h (revision 130663)
+++ include/private/gc_priv.h (working copy)
@@ -472,16 +472,18 @@
# if defined(POWERPC)
# if CPP_WORDSZ == 32
# define GC_THREAD_STATE_T ppc_thread_state_t
-# define GC_MACH_THREAD_STATE PPC_THREAD_STATE
-# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT
+# define GC_MACH_THREAD_STATE PPC_THREAD_STATE
+# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT
# define GC_MACH_HEADER mach_header
# define GC_MACH_SECTION section
+# define GC_GETSECTBYNAME getsectbynamefromheader
# else
# define GC_THREAD_STATE_T ppc_thread_state64_t
-# define GC_MACH_THREAD_STATE PPC_THREAD_STATE64
-# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE64_COUNT
+# define GC_MACH_THREAD_STATE PPC_THREAD_STATE64
+# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE64_COUNT
# define GC_MACH_HEADER mach_header_64
# define GC_MACH_SECTION section_64
+# define GC_GETSECTBYNAME getsectbynamefromheader_64
# endif
# elif defined(I386) || defined(X86_64)
# if CPP_WORDSZ == 32
@@ -490,12 +492,14 @@
# define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE32_COUNT
# define GC_MACH_HEADER mach_header
# define GC_MACH_SECTION section
+# define GC_GETSECTBYNAME getsectbynamefromheader
# else
# define GC_THREAD_STATE_T x86_thread_state64_t
# define GC_MACH_THREAD_STATE x86_THREAD_STATE64
# define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE64_COUNT
# define GC_MACH_HEADER mach_header_64
# define GC_MACH_SECTION section_64
+# define GC_GETSECTBYNAME getsectbynamefromheader_64
# endif
# else
# error define GC_THREAD_STATE_T
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] boehm-gc: darwin cleanup
2007-12-07 21:18 [patch] darwin cleanup Andreas Tobler
@ 2007-12-07 21:32 ` Andreas Tobler
2008-02-19 21:32 ` Andreas Tobler
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Tobler @ 2007-12-07 21:32 UTC (permalink / raw)
To: Java Patches, Boehm, Hans
Andreas Tobler wrote:
> Hi all,
>
> this patch went already into the queue of boehm-gc, not yet ack'ed.
>
> It does cleanup some sins I did earlier in my life.
>
> Ok for trunk?
>
> Andreas
>
> 2007-12-07 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).
>
I have to change the subject... sorry.
Andreas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] boehm-gc: darwin cleanup
2007-12-07 21:32 ` [patch] boehm-gc: " Andreas Tobler
@ 2008-02-19 21:32 ` Andreas Tobler
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Tobler @ 2008-02-19 21:32 UTC (permalink / raw)
To: Java Patches, Boehm, Hans
Andreas Tobler wrote:
> Andreas Tobler wrote:
>> Hi all,
>>
>> this patch went already into the queue of boehm-gc, not yet ack'ed.
>>
>> It does cleanup some sins I did earlier in my life.
>>
>> Ok for trunk?
>>
>> Andreas
>>
>> 2007-12-07 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).
>>
> I have to change the subject... sorry.
Huuh, I completely forgot about this one for gcc repo.
Hans acked for boehm-gc.
I comitted to trunk (4.4)
Andreas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-02-19 21:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-07 21:18 [patch] darwin cleanup Andreas Tobler
2007-12-07 21:32 ` [patch] boehm-gc: " Andreas Tobler
2008-02-19 21:32 ` Andreas Tobler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).