summaryrefslogtreecommitdiff
path: root/gcc/unwind-dw2-fde-darwin.c
diff options
context:
space:
mode:
authorshebs <shebs@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-05 18:39:43 +0000
committershebs <shebs@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-05 18:39:43 +0000
commit85d3e3b577e7f65d7ac7b903ef88305270d25b81 (patch)
tree92090e557808239acca7de92b369dca94e57a36b /gcc/unwind-dw2-fde-darwin.c
parent58604fff86606138a88310ab5ca9b81efa33c683 (diff)
downloadgcc-85d3e3b577e7f65d7ac7b903ef88305270d25b81.tar.gz
* unwind-dw2-fde-darwin.c (examine_objects): Use 64-bit
Mach-O getters if ppc64. * config/darwin.c (darwin_asm_output_dwarf_delta): Obey size argument. * config/darwin.h (ASM_PREFERRED_EH_DATA_FORMAT): Use signed four-byte field for global code case. (STARTFILE_SPEC): Avoid crt2.o for 64-bit compilation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92962 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/unwind-dw2-fde-darwin.c')
-rw-r--r--gcc/unwind-dw2-fde-darwin.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/unwind-dw2-fde-darwin.c b/gcc/unwind-dw2-fde-darwin.c
index 24cf3bca7e9..12c9ed377f0 100644
--- a/gcc/unwind-dw2-fde-darwin.c
+++ b/gcc/unwind-dw2-fde-darwin.c
@@ -57,8 +57,11 @@ extern void _keymgr_set_and_unlock_processwide_ptr (int, void *);
extern void _keymgr_unlock_processwide_ptr (int);
struct mach_header;
+struct mach_header_64;
extern char *getsectdatafromheader (struct mach_header*, const char*,
const char *, unsigned long *);
+extern char *getsectdatafromheader_64 (struct mach_header*, const char*,
+ const char *, unsigned long *);
/* This is referenced from KEYMGR_GCC3_DW2_OBJ_LIST. */
struct km_object_info {
@@ -151,11 +154,21 @@ examine_objects (void *pc, struct dwarf_eh_bases *bases, int dont_alloc)
char *fde;
unsigned long sz;
+#ifdef __ppc64__
+ fde = getsectdatafromheader_64 ((struct mach_header_64 *) image->mh,
+ "__DATA", "__eh_frame", &sz);
+#else
fde = getsectdatafromheader (image->mh, "__DATA", "__eh_frame", &sz);
+#endif
if (fde == NULL)
{
+#ifdef __ppc64__
+ fde = getsectdatafromheader_64 ((struct mach_header_64 *) image->mh,
+ "__TEXT", "__eh_frame", &sz);
+#else
fde = getsectdatafromheader (image->mh, "__TEXT",
"__eh_frame", &sz);
+#endif
if (fde != NULL)
image->examined_p |= IMAGE_IS_TEXT_MASK;
}