This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[z80][committed] allow marking sections as code or data


Hi,

I have checked in the patches below that allow sections in z80-coff 
to be marked as code or data. This solves some testsuite faillures 
where objdump for z80 reported data sections to contain "CODE" 
where "DATA "was expected.
Remarkably the z80 target can pass all the testcases from 
ld/testsuite/ld-scripts/align.exp without storing alignment 
requirements for sections in its object files.

Arnold Metselaar

bfd/ChangeLog:
	* coff-z80.c (z80coff_vec): Allow sections to be of type
	SEC_CODE or SEC_DATA
ld/testsuite/ChangeLog:
	* ld-scripts/align.exp: Remove xfails for z80-*-coff

Index: bfd/coff-z80.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-z80.c,v
retrieving revision 1.9
diff -u -p -r1.9 coff-z80.c
--- bfd/coff-z80.c      2 Sep 2009 07:18:36 -0000       1.9
+++ bfd/coff-z80.c      17 Oct 2009 16:45:48 -0000
@@ -283,6 +283,7 @@ extra_case (bfd *in_abfd,
 #undef  coff_bfd_relax_section
 #define coff_bfd_relax_section bfd_coff_reloc16_relax_section

-CREATE_LITTLE_COFF_TARGET_VEC (z80coff_vec, "coff-z80", 0, 0, '\0', 
NULL,
+CREATE_LITTLE_COFF_TARGET_VEC (z80coff_vec, "coff-z80", 0,
+                              SEC_CODE | SEC_DATA, '\0', NULL,
                               COFF_SWAP_TABLE)

Index: ld/testsuite/ld-scripts/align.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/align.exp,v
retrieving revision 1.12
diff -u -p -r1.12 align.exp
--- ld/testsuite/ld-scripts/align.exp   4 Nov 2007 23:49:09 -0000       
1.12
+++ ld/testsuite/ld-scripts/align.exp   17 Oct 2009 16:45:48 -0000
@@ -46,11 +46,7 @@ if ![ld_simple_link $ld tmpdir/align "$L
 }

 if ![is_aout_format] {
-    # The z80-coff port defaults to a "binary" like output
-    # file format which does not include a data section.
-    setup_xfail "z80-*-coff"
     run_dump_test align2a
-    setup_xfail "z80-*-coff"
     run_dump_test align2b
 }
 run_dump_test align2c


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]