This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: 64-bit host failures, tic4x
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Cc: Nick Clifton <nickc at redhat dot com>
- Date: Mon, 27 Feb 2012 19:01:58 +1030
- Subject: Re: 64-bit host failures, tic4x
- Authentication-results: mr.google.com; spf=pass (google.com: domain of amodra@gmail.com designates 10.68.201.101 as permitted sender) smtp.mail=amodra@gmail.com; dkim=pass header.i=amodra@gmail.com
- References: <20120227063137.GB3613@bubble.grove.modra.org> <20120227065321.GF3613@bubble.grove.modra.org>
On Mon, Feb 27, 2012 at 05:23:21PM +1030, Alan Modra wrote:
> + /* FIXME: subseg_text_p tests SEC_CODE which isn't in allowed
> + section flags. See bfd/coff-tic4x.c target vecs. */
Here's the obvious fix, but since I'm not a COFF expert I'm asking
for an OK to commit. My admittedly superficial testing didn't show
any differences in section types.
bfd/
* coff-tic4x.c (tic4x_coff0_vec, tic4x_coff0_beh_vec,
tic4x_coff1_vec, tic4x_coff1_beh_vec, tic4x_coff2_vec,
tic4x_coff2_beh_vec): Allow SEC_CODE and SEC_READONLY in
section flags.
gas/
* config/tc-tic4x.c: Remove alignment TODO comments.
(tic4x_do_align): Enable subseg_text_p test.
Index: bfd/coff-tic4x.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-tic4x.c,v
retrieving revision 1.16
diff -u -p -r1.16 coff-tic4x.c
--- bfd/coff-tic4x.c 18 Jul 2008 11:30:22 -0000 1.16
+++ bfd/coff-tic4x.c 27 Feb 2012 07:18:39 -0000
@@ -1,6 +1,6 @@
/* BFD back-end for TMS320C4X coff binaries.
Copyright 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2005, 2007,
- 2008 Free Software Foundation, Inc.
+ 2008, 2012 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
@@ -274,19 +274,31 @@ tic4x_reloc_processing (relent, reloc, s
/* TI COFF v0, DOS tools (little-endian headers). */
-CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff0_vec, "coff0-tic4x", HAS_LOAD_PAGE, 0, '_', NULL, (PTR)&ticoff0_swap_table);
+CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff0_vec, "coff0-tic4x",
+ HAS_LOAD_PAGE, SEC_CODE | SEC_READONLY, '_',
+ NULL, &ticoff0_swap_table);
/* TI COFF v0, SPARC tools (big-endian headers). */
-CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff0_beh_vec, "coff0-beh-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff0_vec, (PTR)&ticoff0_swap_table);
+CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff0_beh_vec, "coff0-beh-tic4x",
+ HAS_LOAD_PAGE, SEC_CODE | SEC_READONLY, '_',
+ &tic4x_coff0_vec, &ticoff0_swap_table);
/* TI COFF v1, DOS tools (little-endian headers). */
-CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff1_vec, "coff1-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff0_beh_vec, (PTR)&ticoff1_swap_table);
+CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff1_vec, "coff1-tic4x",
+ HAS_LOAD_PAGE, SEC_CODE | SEC_READONLY, '_',
+ &tic4x_coff0_beh_vec, &ticoff1_swap_table);
/* TI COFF v1, SPARC tools (big-endian headers). */
-CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff1_beh_vec, "coff1-beh-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff1_vec, (PTR)&ticoff1_swap_table);
+CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff1_beh_vec, "coff1-beh-tic4x",
+ HAS_LOAD_PAGE, SEC_CODE | SEC_READONLY, '_',
+ &tic4x_coff1_vec, &ticoff1_swap_table);
/* TI COFF v2, TI DOS tools output (little-endian headers). */
-CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff2_vec, "coff2-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff1_beh_vec, COFF_SWAP_TABLE);
+CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff2_vec, "coff2-tic4x",
+ HAS_LOAD_PAGE, SEC_CODE | SEC_READONLY, '_',
+ &tic4x_coff1_beh_vec, COFF_SWAP_TABLE);
/* TI COFF v2, TI SPARC tools output (big-endian headers). */
-CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff2_beh_vec, "coff2-beh-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff2_vec, COFF_SWAP_TABLE);
+CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff2_beh_vec, "coff2-beh-tic4x",
+ HAS_LOAD_PAGE, SEC_CODE | SEC_READONLY, '_',
+ &tic4x_coff2_vec, COFF_SWAP_TABLE);
Index: gas/config/tc-tic4x.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-tic4x.c,v
retrieving revision 1.33
diff -u -p -r1.33 tc-tic4x.c
--- gas/config/tc-tic4x.c 27 Feb 2012 06:52:20 -0000 1.33
+++ gas/config/tc-tic4x.c 27 Feb 2012 07:18:40 -0000
@@ -27,11 +27,6 @@
o .align cannot handle fill-data-width larger than 0xFF/8-bits. It
should be possible to define a 32-bits pattern.
- o .align fills all section with NOP's when used regardless if has
- been used in .text or .data. (However the .align is primarily
- intended used in .text sections. If you require something else,
- use .align <size>,0x00)
-
o .align: Implement a 'bu' insn if the number of nop's exceeds 4
within the align frag. if(fragsize>4words) insert bu fragend+1
first.
@@ -2967,9 +2962,7 @@ tic4x_do_align (int alignment,
{
if (fill == NULL)
{
- /* FIXME: subseg_text_p tests SEC_CODE which isn't in allowed
- section flags. See bfd/coff-tic4x.c target vecs. */
- if (1 || subseg_text_p (now_seg))
+ if (subseg_text_p (now_seg))
{
char nop[4];
--
Alan Modra
Australia Development Lab, IBM