bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fixes to build arm-epoc-pe binutils


From: Tomas Hurka
Subject: Fixes to build arm-epoc-pe binutils
Date: Thu, 9 Nov 2000 18:28:00 +0100

Hi All,
In summer I started working on cross-compiler for Psion EPOC system. The  
cross-compiler is part of Psion-independent software developer kit for EPOC 
called  
XDSK. I manage to patch the binutils and egcs to produce correct executable for 
 
Psion palmtops so I want to report my changes back to gnu-community.
For binutils I compiled version 2.10.1 compiled for target arm-epoc-pe running 
on  
host i585-pc-linux-gnu (RedHat 6.2) and also for powerpc-apple-rhapsody5.6 (Mac 
OS X  
Server 1.2).  I patch three files (output of diff -Naur is bellow)
bfd/peicode.h
and
binutils/configure
binutils/dlltool.c

In first file I replaced
extern bfd_target armpei_little_vec
with
extern bfd_target TARGET_LITTLE_SYM
because  bfd_target for arm-epoc-pe target is different from armpei_little_vec. 
 
Without this patch compilation stops with armpei_little_vec as undefined symbol.
Other two files modified support for arm-epoc-pe in dlltool. Support for it was 
 
introduced in version 1.17 of dlltool.c, but did not work for me. I would be 
happy  
if someone can look at my patches and tell me if they are OK or not and what 
should  
I do to put them in source tree. Thanks.

Output of diff -Naur
---------------------------------------------------------
diff -Naur original/binutils-2.10.1/bfd/peicode.h 
patched/binutils-2.10.1/bfd/peicode.h
--- original/binutils-2.10.1/bfd/peicode.h      Mon Mar  6 23:38:43 2000
+++ patched/binutils-2.10.1/bfd/peicode.h       Thu Nov  9 14:32:53 2000
@@ -1166,9 +1166,9 @@
     case IMAGE_FILE_MACHINE_THUMB:
 #ifdef THUMBPEMAGIC
       {
-       extern bfd_target armpei_little_vec;
+       extern bfd_target TARGET_LITTLE_SYM;
        
-       if (abfd->xvec == & armpei_little_vec)
+       if (abfd->xvec == & TARGET_LITTLE_SYM)
          magic = THUMBPEMAGIC;
       }
 #endif
diff -Naur original/binutils-2.10.1/binutils/configure  
patched/binutils-2.10.1/binutils/configure
--- original/binutils-2.10.1/binutils/configure Thu Nov  9 14:28:12 2000
+++ patched/binutils-2.10.1/binutils/configure  Thu Nov  9 14:31:35 2000
@@ -4818,6 +4818,11 @@
        *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
        esac
        case $targ in
+       arm-epoc-pe*)
+         BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM"
+         BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+         ;;
        arm-*pe* | arm-*-wince)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
diff -Naur original/binutils-2.10.1/binutils/dlltool.c  
patched/binutils-2.10.1/binutils/dlltool.c
--- original/binutils-2.10.1/binutils/dlltool.c Fri Apr  7 06:39:24 2000
+++ patched/binutils-2.10.1/binutils/dlltool.c  Thu Nov  9 14:31:35 2000
@@ -383,7 +383,11 @@
 static FILE *base_file;

 #ifdef DLLTOOL_ARM
-static const char *mname = "arm";
+       #ifdef DLLTOOL_ARM_EPOC
+       static const char *mname = "arm-epoc";
+       #else
+       static const char *mname = "arm";
+       #endif
 #endif

 #ifdef DLLTOOL_I386
@@ -605,7 +609,7 @@
   ,
   {
 #define MARM_EPOC 9
-    "arm", ".byte", ".short", ".long", ".asciz", "@",
+    "arm-epoc", ".byte", ".short", ".long", ".asciz", "@",
     "ldr\tip,[pc]\n\tldr\tpc,[ip]\n\t.long",
     ".global", ".space", ".align\t2",".align\t4", "",
     "epoc-pe-arm-little", bfd_arch_arm,
@@ -726,6 +730,7 @@
     case MMCORE_LE:
     case MMCORE_ELF:
     case MMCORE_ELF_LE:
+    case MARM_EPOC:
       break;
     default:
       /* xgettext:c-format */
@@ -750,6 +755,7 @@
     case MMCORE_LE:
     case MMCORE_ELF:
     case MMCORE_ELF_LE:
+    case MARM_EPOC:
       return ".rva\t";
     default:
       /* xgettext:c-format */
@@ -773,6 +779,7 @@
     case MMCORE_LE:
     case MMCORE_ELF:
     case MMCORE_ELF_LE:
+    case MARM_EPOC:
       break;
     case M386:
       return "_";

---------------------------------------------------------
Output of diff -Naur once again uuencode, just in case something went wrong:
begin 644 binutils-2.10.1.epoc.patch.gz
M'XL("$?6"CH"`V)I;G5T:6QS+3(N,3`N,2YE<&]C+G!A=&-H`+U547/:.!!^
MQK]BQ\U<`MB`,1AP)C=0<%)F,&0(O>M-<^,11H"FQO88D:9W[7^_E6Q(>G`%
M[J$\H)7U[:==[:?5C,WGH`_))H$H80L6DJ`\9>&&LV"M5TM&I624I_-9.:;,
MCV:TM(28<'])9S]&*;JNGTB8<Z,07)(`6%`U;;address@hidden;;K+<
MP#!Z`FB!4;/-JEW/*-IMT`W#LK06%+.QW59`_'RRIM!W.W>.=]L?.)[;Z;[K
M#QUO\NZ]^]96X`V;S^@<Y/3>05R_FSH"_*WH.?K,:1("QN%QDBPH!Y*L,"(O
M8)P'U'NB_K52/`";=,9WSL0;]"<3W/7A#_=:@1P2LCE<$<3IOSZC+]S<P"_[
ME'FD/`3<(\TC*<"address@hidden>IO%-\R1AC.DDS]E=HH4LGG9C\(Y6VP2^M\5
MVH,>$<4>_E]EK39MHWJ",H[QF(9MUE_D46L:3<V"HAP-0^HC5]`+^G*U+N3A
M[?O^H.<]C+NCX6\WEQ=7J>7=CT=W^4NX%L6C:^+C(`5U(:H,+,0Z8?%T&D>^
M'M,"address@hidden&8T&@BXS4[Z+*^>#XWR8Y"_1'6"[UG-N'V[4B]=3T'O;
M:6?L>L[]J/O])U4RI-O]WA_VQLZ#V"XS#VXG<address@hidden
MPH=SPE?/D]XL"'@4!27_N`1VT!.EM\/G;A,&G1B;4@,JEFVV[&KM#.F]\/Q0
M>F;3U!I0%$,FO#4G'&^L:address@hidden>G9NB9W!4^IJ#O\0F6EB%
M9$7QRJM8/E5TH'T_*1=<.>(MQ9M2T&!-CSMD6-%2MJWE0.!]LVG)[*U*761O
M55HXI%U94V1WA3?HP$(*[D[<+44734INHX%:FG[A5!KK991P:051N)`&6?OL
M+V&U54W<.WB5SEF^LB^JP2QYY"S6/L;^GX_A(Y?SV-<^LEC.,^<,75H$T90$
M*7],_'0G$K`%0JNJMK-K8F'GEC4*702:MGM<%J\&2?PE_JTT>6:-JB5Z5<.L
M[,XL>\E<MSL:.][`L?<_.H/;PU\EO/BRL#UN>_M&3!-*/F4O!M:$;`*^6RL7
MX!D?-(Y/G.WK\RA9$0Z%<AIGO2+CK-=_3IP)Y1M\9M52\D0>N?I_(FZ8,N)&
6Z^>?;`K!>[&7CX>I_`,(2+B]HPD``-=_
`
end

Best regards,
---
Tomas Hurka
address@hidden
NeXTMAIL and MIME OK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]