bfd/
authorAlan Modra <amodra@gmail.com>
Tue, 6 Nov 2012 05:51:18 +0000 (05:51 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 6 Nov 2012 05:51:18 +0000 (05:51 +0000)
* 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.

bfd/ChangeLog
bfd/coff-tic4x.c
gas/ChangeLog
gas/config/tc-tic4x.c

index ebec0d78dbf88c17bd91464e868e8b81b6b61a07..0f27dab4618b2ac5e7c375132064df62c76bcac4 100644 (file)
@@ -1,3 +1,10 @@
+2012-11-06  Alan Modra  <amodra@gmail.com>
+
+       * 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.
+
 2012-11-06  Alan Modra  <amodra@gmail.com>
 
        * elf64-ppc.c (struct ppc_link_hash_table): Add dot_toc_dot.
index 5814faf7588403e4aa55e4baafff58befd80d932..c59894a0445cd3fc49bf622ef49ce370ef971b4a 100644 (file)
@@ -261,19 +261,31 @@ tic4x_reloc_processing (arelent *relent,
 
 
 /* TI COFF v0, DOS tools (little-endian headers).  */
-CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff0_vec, "coff0-tic4x", HAS_LOAD_PAGE, 0, '_', NULL, & 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, & 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, & 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, & 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 9ad252f6192d72a799709bb983c3bc1137fe3898..ad6fcb64379a29b67c0956cd446285620bfb48d7 100644 (file)
@@ -1,3 +1,8 @@
+2012-11-06  Alan Modra  <amodra@gmail.com>
+
+       * config/tc-tic4x.c: Remove alignment TODO comments.
+       (tic4x_do_align): Enable subseg_text_p test.
+
 2012-11-06  Alan Modra  <amodra@gmail.com>
 
        * config/tc-ppc.c (ppc_elf_adjust_symtab): New function, split out..
index 1764b0bc43e7c5f2b9435cf09ea08afe1d43777a..dd21000b6095d11ebc2faa69fe1d51278510f881 100644 (file)
   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.
@@ -2966,9 +2961,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];