Remove support for creating ARM NOREAD sections.
authorNick Clifton <nickc@redhat.com>
Thu, 4 Feb 2016 11:57:57 +0000 (11:57 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 4 Feb 2016 11:57:57 +0000 (11:57 +0000)
gas * config/obj-elf.c (obj_elf_change_section): Remove support for
ARM NOREAD sections.
* config/tc-arm.c (arm_elf_section_letter): Delete.
* config/tc-arm.h (md_elf_section_letter): Delete.
* doc/c-arm.texi (ARM Section Attribute): Delete section.
* testsuite/gas/arm/section-execute-only.d: Delete.
* testsuite/gas/arm/section-execute-only.s: Delete.

ld * testsuite/ld-arm/arm-elf.exp: Remove ARM NOREAD section tests.
* testsuite/ld-arm/thumb1-input-section-flag-match.d: Delete.
* testsuite/ld-arm/thumb1-input-section-flag-match.s: Delete.
* testsuite/ld-arm/thumb1-noread-not-present-mixing-two-section.d: Delete.
* testsuite/ld-arm/thumb1-noread-not-present-mixing-two-section.s: Delete.
* testsuite/ld-arm/thumb1-noread-present-one-section.d: Delete.
* testsuite/ld-arm/thumb1-noread-present-one-section.s: Delete.
* testsuite/ld-arm/thumb1-noread-present-two-section.d: Delete.
* testsuite/ld-arm/thumb1-noread-present-two-section.s: Delete.

17 files changed:
gas/ChangeLog
gas/config/obj-elf.c
gas/config/tc-arm.c
gas/config/tc-arm.h
gas/doc/c-arm.texi
gas/testsuite/gas/arm/section-execute-only.d [deleted file]
gas/testsuite/gas/arm/section-execute-only.s [deleted file]
ld/ChangeLog
ld/testsuite/ld-arm/arm-elf.exp
ld/testsuite/ld-arm/thumb1-input-section-flag-match.d [deleted file]
ld/testsuite/ld-arm/thumb1-input-section-flag-match.s [deleted file]
ld/testsuite/ld-arm/thumb1-noread-not-present-mixing-two-section.d [deleted file]
ld/testsuite/ld-arm/thumb1-noread-not-present-mixing-two-section.s [deleted file]
ld/testsuite/ld-arm/thumb1-noread-present-one-section.d [deleted file]
ld/testsuite/ld-arm/thumb1-noread-present-one-section.s [deleted file]
ld/testsuite/ld-arm/thumb1-noread-present-two-section.d [deleted file]
ld/testsuite/ld-arm/thumb1-noread-present-two-section.s [deleted file]

index e64617cac66cd42cc1ed9fbb3fc50f67d2476e77..f62990a8c7c1af2f7af7c2105c2b630a615c2a02 100644 (file)
@@ -1,3 +1,13 @@
+2016-02-04  Nick Clifton  <nickc@redhat.com>
+
+       * config/obj-elf.c (obj_elf_change_section): Remove support for
+       ARM NOREAD sections.
+       * config/tc-arm.c (arm_elf_section_letter): Delete.
+       * config/tc-arm.h (md_elf_section_letter): Delete.
+       * doc/c-arm.texi (ARM Section Attribute): Delete section.
+       * testsuite/gas/arm/section-execute-only.d: Delete.
+       * testsuite/gas/arm/section-execute-only.s: Delete.
+
 2016-02-04  Nick Clifton  <nickc@redhat.com>
 
        PR target/19561
index 6d6d5f3a3fcf06a84a91a0584d5c0f4d730668ae..f4726ffcfae73a823fc0d4e20318aa6a182b39e8 100644 (file)
 #include "elf/nios2.h"
 #endif
 
-#ifdef TC_ARM
-#include "elf/arm.h"
-#endif
-
 static void obj_elf_line (int);
 static void obj_elf_size (int);
 static void obj_elf_type (int);
@@ -677,11 +673,6 @@ obj_elf_change_section (const char *name,
                       || ssect->type == SHT_PREINIT_ARRAY))
            /* RX init/fini arrays can and should have the "awx" attributes set.  */
            ;
-#endif
-#ifdef TC_ARM
-         else if (attr == (SHF_EXECINSTR | SHF_ARM_NOREAD | SHF_ALLOC))
-           /* ARM can have code section with SHF_ARM_NOREAD attribute.  */
-           ;
 #endif
          else
            {
index 055e525a6d9a9c207ea285b9c63fd815b48290fd..be6436eef98a5b0e8e07ce16895ec2bb7f1580ba 100644 (file)
@@ -24094,16 +24094,6 @@ arm_fix_adjustable (fixS * fixP)
 #endif /* defined (OBJ_ELF) || defined (OBJ_COFF) */
 
 #ifdef OBJ_ELF
-bfd_vma
-arm_elf_section_letter (int letter, char **ptrmsg)
-{
-  if (letter == 'y')
-    return SHF_ARM_NOREAD;
-
-  *ptrmsg = _("unrecognized .section attribute: want a,e,w,x,y,M,S,G,T");
-  return -1;
-}
-
 const char *
 elf32_arm_target_format (void)
 {
index 749629c15fe879da0b7c471cae9c4cddd1e303a9..319b2c2dfef4d8030f4403ea5b18aa0c517684f3 100644 (file)
@@ -114,9 +114,6 @@ extern bfd_boolean tc_start_label_without_colon (void);
 #define tc_frob_fake_label(S) arm_frob_label (S)
 
 #ifdef OBJ_ELF
-#define md_elf_section_letter arm_elf_section_letter
-extern bfd_vma arm_elf_section_letter (int, char **);
-
 #define md_end arm_md_end
 extern void arm_md_end (void);
 bfd_boolean arm_is_eabi (void);
index 886b02496e8192d8daad2bd6f5ce70be65629d64..8679424806d20646da673c8b8bea236bec6bacbf 100644 (file)
@@ -23,7 +23,6 @@
 * ARM Opcodes::              Opcodes
 * ARM Mapping Symbols::      Mapping Symbols
 * ARM Unwinding Tutorial::   Unwinding
-* ARM Section Attribute::    Section Attribute
 @end menu
 
 @node ARM Options
@@ -1239,14 +1238,3 @@ know more about the object-file format used to represent unwind
 information, you may consult the @cite{Exception Handling ABI for the
 ARM Architecture} available from @uref{http://infocenter.arm.com}.
 
-@node ARM Section Attribute
-@section Section Attribute
-
-@cindex ARM section attribute
-@table @code
-@item y
-This letter specifies a text section with NOREAD attribute for
-hardware that supports execute-only memory region.  If not supported
-by hardware a section with this attribute will be treated as normal
-text section.
-@end table
diff --git a/gas/testsuite/gas/arm/section-execute-only.d b/gas/testsuite/gas/arm/section-execute-only.d
deleted file mode 100644 (file)
index d45a132..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# name: test executable-only section attribute
-# as:
-# readelf: -t
-# This test is only valid on EABI based ports.
-# target: *-*-*eabi* *-*-nacl*
-There are 10 section headers, starting at offset 0x16c:
-
-Section Headers:
-  \[Nr\] Name
-       Type            Addr     Off    Size   ES   Lk Inf Al
-       Flags
-  \[ 0\] 
-       NULL            00000000 000000 000000 00   0   0  0
-       \[00000000\]: 
-  \[ 1\] .text
-       PROGBITS        00000000 000034 000000 00   0   0  2
-       \[00000006\]: ALLOC, EXEC
-  \[ 2\] .data
-       PROGBITS        00000000 000034 000000 00   0   0  1
-       \[00000003\]: WRITE, ALLOC
-  \[ 3\] .bss
-       NOBITS          00000000 000034 000000 00   0   0  1
-       \[00000003\]: WRITE, ALLOC
-  \[ 4\] .text.foo
-       PROGBITS        00000000 000034 000010 00   0   0  4
-       \[20000006\]: ALLOC, EXEC, ARM_NOREAD
-#pass
diff --git a/gas/testsuite/gas/arm/section-execute-only.s b/gas/testsuite/gas/arm/section-execute-only.s
deleted file mode 100644 (file)
index 9d5ffc6..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-        .syntax unified
-        .cpu cortex-m3
-        .fpu softvfp
-        .eabi_attribute 20, 1
-        .eabi_attribute 21, 1
-        .eabi_attribute 23, 3
-        .eabi_attribute 24, 1
-        .eabi_attribute 25, 1
-        .eabi_attribute 26, 1
-        .eabi_attribute 30, 2
-        .eabi_attribute 34, 1
-        .eabi_attribute 18, 4
-        .thumb
-        .section        .text.foo,"axy",%progbits
-        .align  2
-        .global foo
-        .thumb
-        .thumb_func
-        .type   foo, %function
-foo:
-        @ args = 0, pretend = 0, frame = 0
-        @ frame_needed = 0, uses_anonymous_args = 0
-        @ link register save eliminated.
-        movs    r0, #1
-        movs    r1, #1
-        movw    r2, #257
-        movs    r3, #1
-        b       madd
-        .size   foo, .-foo
-
index 54e169bd8fb2c862837f09736d464f36aae3c3d7..584a8dd09d9c79210ee356fa5484833f3267b5a3 100644 (file)
@@ -1,3 +1,15 @@
+2016-02-04  Nick Clifton  <nickc@redhat.com>
+
+       * testsuite/ld-arm/arm-elf.exp: Remove ARM NOREAD section tests.
+       * testsuite/ld-arm/thumb1-input-section-flag-match.d: Delete.
+       * testsuite/ld-arm/thumb1-input-section-flag-match.s: Delete.
+       * testsuite/ld-arm/thumb1-noread-not-present-mixing-two-section.d: Delete.
+       * testsuite/ld-arm/thumb1-noread-not-present-mixing-two-section.s: Delete.
+       * testsuite/ld-arm/thumb1-noread-present-one-section.d: Delete.
+       * testsuite/ld-arm/thumb1-noread-present-one-section.s: Delete.
+       * testsuite/ld-arm/thumb1-noread-present-two-section.d: Delete.
+       * testsuite/ld-arm/thumb1-noread-present-two-section.s: Delete.
+
 2016-02-03  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR gas/19520
index 258a3eacab5b2b184c6da225bb2eb5feb9bca29a..a2082a8dbc025f2e220b5c431ca9d20de8916593 100644 (file)
@@ -312,18 +312,6 @@ set armelftests_nonacl {
     {"TLS shared library gdesc local" "--no-fix-arm1176 -shared -T arm-dyn.ld" "" "" {tls-lib-loc.s}
      {{objdump -fdw tls-lib-loc.d} {objdump -Rw tls-lib-loc.r}}
      "tls-lib-loc.so"}
-    {"PF_R not present when one noread section" "-static -T arm.ld" "" "" {thumb1-noread-present-one-section.s}
-     {{readelf -l thumb1-noread-present-one-section.d}}
-     "thumb1-noread-present-one-section"}
-    {"PF_R not present when two noread sections" "-static -T arm.ld" "" "" {thumb1-noread-present-two-section.s}
-     {{readelf -l thumb1-noread-present-two-section.d}}
-     "thumb1-noread-present-two-section"}
-    {"PF_R present when mixing noread section with read section" "-static -T arm.ld" "" "" {thumb1-noread-not-present-mixing-two-section.s}
-     {{readelf -l thumb1-noread-not-present-mixing-two-section.d}}
-     "thumb1-noread-not-present-mixing-two-section"}
-    {"Match SHF_ARM_NOREAD with INPUT_SECTION_FLAGS directive" "-static -T arm_noread.ld" "" "" {thumb1-input-section-flag-match.s}
-     {{readelf -l thumb1-input-section-flag-match.d}}
-     "thumb1-noread-not-present-mixing-two-section"}
 }
 
 if { ![istarget "arm*-*-nacl*"] } {
diff --git a/ld/testsuite/ld-arm/thumb1-input-section-flag-match.d b/ld/testsuite/ld-arm/thumb1-input-section-flag-match.d
deleted file mode 100644 (file)
index e25a4f4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#...
-Program Headers:
-#...
-  LOAD           0x000000 0x00000000 0x00000000 0x08002 0x08002 R E 0x10000
-  LOAD           0x010000 0x00800000 0x00800000 0x00002 0x00002   E 0x10000
-#...
diff --git a/ld/testsuite/ld-arm/thumb1-input-section-flag-match.s b/ld/testsuite/ld-arm/thumb1-input-section-flag-match.s
deleted file mode 100644 (file)
index 6f1ad62..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-       .text
-       .section .text.fetchonly,"axy",%progbits
-       .arch armv6s-m
-       .syntax unified
-       .global _start
-       .thumb_func
-       .type   _start, %function
-_start:
-       bx lr
-
-       .text
-       .arch armv6s-m
-       .syntax unified
-       .global foo
-       .thumb_func
-       .type   foo, %function
-foo:
-       bx lr
diff --git a/ld/testsuite/ld-arm/thumb1-noread-not-present-mixing-two-section.d b/ld/testsuite/ld-arm/thumb1-noread-not-present-mixing-two-section.d
deleted file mode 100644 (file)
index 9150576..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#...
-Program Headers:
-#...
-  LOAD           0x000000 0x00000000 0x00000000 0x08004 0x08004 R E 0x10000
-#...
diff --git a/ld/testsuite/ld-arm/thumb1-noread-not-present-mixing-two-section.s b/ld/testsuite/ld-arm/thumb1-noread-not-present-mixing-two-section.s
deleted file mode 100644 (file)
index 5b14873..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-       .text
-       .section .text.noread,"axy",%progbits
-       .arch armv6s-m
-       .syntax unified
-       .global _start
-       .thumb_func
-       .type   _start, %function
-_start:
-       bx lr
-
-       .text
-       .arch armv6s-m
-       .syntax unified
-       .global foo
-       .thumb_func
-       .type   foo, %function
-foo:
-       bx lr
diff --git a/ld/testsuite/ld-arm/thumb1-noread-present-one-section.d b/ld/testsuite/ld-arm/thumb1-noread-present-one-section.d
deleted file mode 100644 (file)
index 1faf40c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#...
-Program Headers:
-#...
-  LOAD           0x000000 0x00000000 0x00000000 0x08002 0x08002   E 0x10000
-#...
diff --git a/ld/testsuite/ld-arm/thumb1-noread-present-one-section.s b/ld/testsuite/ld-arm/thumb1-noread-present-one-section.s
deleted file mode 100644 (file)
index 203cfd5..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-       .text
-       .section .text.fetchonly,"axy",%progbits
-       .arch armv6s-m
-       .syntax unified
-       .global _start
-       .thumb_func
-       .type   _start, %function
-_start:
-       bx lr
diff --git a/ld/testsuite/ld-arm/thumb1-noread-present-two-section.d b/ld/testsuite/ld-arm/thumb1-noread-present-two-section.d
deleted file mode 100644 (file)
index 365cab0..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#...
-Program Headers:
-#...
-  LOAD           0x000000 0x00000000 0x00000000 0x08004 0x08004   E 0x10000
-#...
diff --git a/ld/testsuite/ld-arm/thumb1-noread-present-two-section.s b/ld/testsuite/ld-arm/thumb1-noread-present-two-section.s
deleted file mode 100644 (file)
index 245ab25..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-       .text
-       .section .text.fetchonly.first,"axy",%progbits
-       .arch armv6s-m
-       .syntax unified
-       .global _start
-       .thumb_func
-       .type   _start, %function
-_start:
-       bx lr
-
-       .text
-       .section .text.fetchonly.second,"axy",%progbits
-       .arch armv6s-m
-       .syntax unified
-       .global foo
-       .thumb_func
-       .type   foo, %function
-foo:
-       bx lr