[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Re: PLT code and Mach-O
From: |
Aurelien Chanudet |
Subject: |
[Gcl-devel] Re: PLT code and Mach-O |
Date: |
Mon, 15 Mar 2004 21:25:37 +0100 |
Hi Camm,
Sorry for the delay replying. Your new PLT code almost works for Mac OS
X. Just a couple of notes :
- When Darwin specific modifications got added to sfaslbfd.c in order
to support BFD for Mach-O, a call to
bfd_mach_o_inject_fp_branch_islands() got omitted. See patch below.
- In configure.in, the test code to detect whether the -Map switch is
available does not for Mac OS X. I slightly modified it so that the
GNU_LD makefile variable is now set appropriately. See patch below.
- In plt.c : as we're not using the -Map switch on Mac OS X, no map
file is available. However, the code in parse_plt() does not handle
this case, as far as I can tell. Maybe a lstat(2) call of some sort
could be added there. No patch here !
Thanks for your dedicated work,
Aurelien
Index: o/sfaslbfd.c
===================================================================
RCS file: /cvsroot/gcl/gcl/o/sfaslbfd.c,v
retrieving revision 1.12.4.1.2.3
diff -u -r1.12.4.1.2.3 sfaslbfd.c
--- o/sfaslbfd.c 28 Feb 2004 20:15:56 -0000 1.12.4.1.2.3
+++ o/sfaslbfd.c 15 Mar 2004 19:56:38 -0000
@@ -304,7 +304,7 @@
for (u=0;u<v;u++) {
struct bfd_link_hash_entry *h;
-
+
if (!strncmp(entry_name_ptr,q[u]->name,5)) {
init_address=q[u]->value;
continue;
@@ -323,6 +323,11 @@
FEerror("Symbol without section",0);
}
+
+#if defined(DARWIN)
+ if (!bfd_mach_o_inject_fp_branch_islands (b, bi, q))
+ FEerror ("Could not inject fp register preservation stubs",0);
+#endif
#ifndef HAVE_ALLOCA
#error Cannot use bfd relocations without alloca at present
Index: configure.in
===================================================================
RCS file: /cvsroot/gcl/gcl/configure.in,v
retrieving revision 1.112.4.1.2.2.2.32
diff -u -r1.112.4.1.2.2.2.32 configure.in
--- configure.in 11 Mar 2004 02:02:30 -0000
1.112.4.1.2.2.2.32
+++ configure.in 15 Mar 2004 19:56:30 -0000
@@ -589,8 +589,7 @@
AC_MSG_CHECKING("for GNU ld option -Map")
touch map
$CC -o foo [ -Wl,-Map ] map foo.o >/dev/null 2>&1
-MAP_SIZE=`cat map | wc -l`
-if test "$MAP_SIZE" != "0" ; then
+if test `cat map | wc -l` != "0" ; then
AC_MSG_RESULT("yes")
AC_DEFINE(HAVE_GNU_LD)
GNU_LD=1
- [Gcl-devel] Re: PLT code and Mach-O,
Aurelien Chanudet <=