[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More fixes for arm-epoc-pe binutils
From: |
Nick Clifton |
Subject: |
Re: More fixes for arm-epoc-pe binutils |
Date: |
Thu, 14 Dec 2000 15:41:44 -0800 |
Hi Tomas,
: Here is another fix for arm-epoc-pe binutils v. 2.10.1 (other fixes can be
found in
: my previous message to this list posted on Thu, 9 Nov 2000). This fixes
problem
: with section flags. After applying this fix arm-epoc-pe-objdump can
disassemble PE
: files produced by arm-epoc-pe-as. If anyone is interested in more details
about this
: and other patches for arm-epoc-pe platform, please, let me know.
:
: --- original/binutils-2.10.1/bfd/coffcode.h Tue Nov 14 21:51:58 2000
: +++ patched/binutils-2.10.1/bfd/coffcode.h Fri Nov 10 16:18:46 2000
: @@ -4979,7 +4979,7 @@
: (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | \
: HAS_SYMS | HAS_LOCALS | WP_TEXT | EXTRA_O_FLAGS), \
: /* section flags */
\
: - (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | EXTRA_S_FLAGS),\
: + (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE |
SEC_READONLY |
: SEC_DATA | EXTRA_S_FLAGS),\
: UNDER, /* leading symbol underscore */ \
: '/', /* ar_pad_char */
\
: 15, /* ar_max_namelen */
\
: @@ -5029,7 +5029,7 @@
: (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | \
: HAS_SYMS | HAS_LOCALS | WP_TEXT | EXTRA_O_FLAGS), \
: /* section flags */ \
: - (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | EXTRA_S_FLAGS),\
: + (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE |
SEC_READONLY |
: SEC_DATA | EXTRA_S_FLAGS),\
: UNDER, /* leading symbol underscore */ \
: '/', /* ar_pad_char */
\
: 15, /* ar_max_namelen */
\
:
First of all, my apologise for taking so long to reply this patch
submission.
Unfortunately I cannot accept it as it, as it is making a global
change to the BFD library. coffcode.h is used by lots of targets, not
just the arm-epoc-pe target. Instead I would suggest that you add the
extra flags to a definition of EXTRA_S_FLAGS for the arm-epoc-pe
target, like this:
Index: bfd/coff-arm.c
===================================================================
RCS file: /cvs/src//src/bfd/coff-arm.c,v
retrieving revision 1.20
diff -p -r1.20 coff-arm.c
*** coff-arm.c 2000/11/25 00:21:34 1.20
--- coff-arm.c 2000/12/14 23:35:57
*************** coff_arm_final_link_postscript (abfd, pf
*** 2536,2545 ****
--- 2536,2547 ----
#define TARGET_UNDERSCORE 0
#endif
+ #ifndef EXTRA_S_FLAGS
#ifdef COFF_WITH_PE
#define EXTRA_S_FLAGS (SEC_LINK_ONCE | SEC_LINK_DUPLICATES)
#else
#define EXTRA_S_FLAGS 0
+ #endif
#endif
/* Forward declaration for use initialising alternative_target field. */
Index: bfd/epoc-pe-arm.c
===================================================================
RCS file: /cvs/src//src/bfd/epoc-pe-arm.c,v
retrieving revision 1.2
diff -p -r1.2 epoc-pe-arm.c
*** epoc-pe-arm.c 1999/06/04 07:39:47 1.2
--- epoc-pe-arm.c 2000/12/14 23:35:58
*************** Foundation, Inc., 59 Temple Place - Suit
*** 32,36 ****
#define bfd_arm_process_before_allocation \
bfd_arm_epoc_pe_process_before_allocation
! #include "pe-arm.c"
--- 32,37 ----
#define bfd_arm_process_before_allocation \
bfd_arm_epoc_pe_process_before_allocation
! #define EXTRA_S_FLAGS (SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_CODE |
SEC_READONLY | SEC_DATA)
+ #include "pe-arm.c"
Index: bfd/epoc-pei-arm.c
===================================================================
RCS file: /cvs/src//src/bfd/epoc-pei-arm.c,v
retrieving revision 1.3
diff -p -r1.3 epoc-pei-arm.c
*** epoc-pei-arm.c 1999/07/12 07:35:12 1.3
--- epoc-pei-arm.c 2000/12/14 23:35:58
*************** Foundation, Inc., 59 Temple Place - Suit
*** 25,29 ****
#define TARGET_BIG_SYM arm_epoc_pei_big_vec
#define TARGET_BIG_NAME "epoc-pei-arm-big"
! #include "pei-arm.c"
--- 25,30 ----
#define TARGET_BIG_SYM arm_epoc_pei_big_vec
#define TARGET_BIG_NAME "epoc-pei-arm-big"
! #define EXTRA_S_FLAGS (SEC_CODE | SEC_READONLY | SEC_DATA)
+ #include "pei-arm.c"
Please could you try this patch out on your system and let me know if
it works for you.
One other point - when you do make patch submissions, please include
an example ChangeLog entry as well, like this:
2000-12-14 Nick Clifton <address@hidden>
* coff-arm.c (EXTRA_S_FLAGS): Only define if not already
defined.
* epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
* epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
Cheers
Nick