This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 3.x development tree".
The branch, master has been updated
via 5f4bab7077947a4695744fdbf4c0c3b19ae7fe13 (commit)
from db15e530757260c5483059544fc95599d2743c4e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5f4bab7077947a4695744fdbf4c0c3b19ae7fe13
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Thu Mar 28 13:19:51 2013 +0100
binutils: Update to 2.23.52.0.1
-----------------------------------------------------------------------
Summary of changes:
binutils/binutils.nm | 2 +-
.../binutils-2.22.52.0.1-relro-on-by-default.patch | 2 +-
.../binutils-2.22.52.0.1-warn-textrel.patch | 51 ++++
...inutils-2.23.52.0.1-as-doc-texinfo-fixes.patch0 | 279 +++++++++++++++++
...> binutils-2.23.52.0.1-hardened-crtbegin.patch} | 8 +-
...nutils-2.23.52.0.1-pt-pax-flags-20130326.patch} | 339 ++++++++-------------
6 files changed, 468 insertions(+), 213 deletions(-)
create mode 100644 binutils/patches/binutils-2.22.52.0.1-warn-textrel.patch
create mode 100644 binutils/patches/binutils-2.23.52.0.1-as-doc-texinfo-fixes.patch0
rename binutils/patches/{binutils-2.22-hardened-crtbegin.patch => binutils-2.23.52.0.1-hardened-crtbegin.patch} (71%)
rename binutils/patches/{binutils-2.23.51.0.5-pt-pax-flags-20121112.patch => binutils-2.23.52.0.1-pt-pax-flags-20130326.patch} (75%)
Difference in files:
diff --git a/binutils/binutils.nm b/binutils/binutils.nm
index 00da9a4..ecde051 100644
--- a/binutils/binutils.nm
+++ b/binutils/binutils.nm
@@ -4,7 +4,7 @@
###############################################################################
name = binutils
-version = 2.23.51.0.5
+version = 2.23.52.0.1
release = 1
maintainer = Michael Tremer <michael.tremer(a)ipfire.org>
diff --git a/binutils/patches/binutils-2.22-hardened-crtbegin.patch b/binutils/patches/binutils-2.22-hardened-crtbegin.patch
deleted file mode 100644
index bc26187..0000000
--- a/binutils/patches/binutils-2.22-hardened-crtbegin.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-https://bugs.gentoo.org/391899
-https://bugs.gentoo.org/393321
-
-Make sure the default ELF linker script does the right thing with our customer
-PIE+PIC gcc objects (until we get a chance to rename them).
-
-2011-12-05 Magnus Granberg <zorry(a)gentoo.org>, Alphat-PC <AlphatPC(a)gmail.com>
-
- * scripttempl/elf.sc: Add support for crtbeginTS.o
-
---- a/ld/scripttempl/elf.sc
-+++ b/ld/scripttempl/elf.sc
-@@ -225,8 +225,8 @@
- if test "${ENABLE_INITFINI_ARRAY}" = "yes"; then
- SORT_INIT_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))"
- SORT_FINI_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))"
-- CTORS_IN_INIT_ARRAY="KEEP (*(EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors))"
-- DTORS_IN_FINI_ARRAY="KEEP (*(EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))"
-+ CTORS_IN_INIT_ARRAY="KEEP (*(EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtbeginTS.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors))"
-+ DTORS_IN_FINI_ARRAY="KEEP (*(EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtbeginTS.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))"
- else
- SORT_INIT_ARRAY="KEEP (*(SORT(.init_array.*)))"
- SORT_FINI_ARRAY="KEEP (*(SORT(.fini_array.*)))"
-@@ -264,6 +264,7 @@
-
- KEEP (*crtbegin.o(.ctors))
- KEEP (*crtbegin?.o(.ctors))
-+ KEEP (*crtbeginTS.o(.ctors))
-
- /* We don't want to include the .ctor section from
- the crtend.o file until after the sorted ctors.
-@@ -280,6 +281,7 @@
- ${CONSTRUCTING+${DTOR_START}}
- KEEP (*crtbegin.o(.dtors))
- KEEP (*crtbegin?.o(.dtors))
-+ KEEP (*crtbeginTS.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
diff --git a/binutils/patches/binutils-2.22.52.0.1-relro-on-by-default.patch b/binutils/patches/binutils-2.22.52.0.1-relro-on-by-default.patch
index 3910df1..65a6c97 100644
--- a/binutils/patches/binutils-2.22.52.0.1-relro-on-by-default.patch
+++ b/binutils/patches/binutils-2.22.52.0.1-relro-on-by-default.patch
@@ -2,9 +2,9 @@ diff -Nur binutils-2.22.52.0.4-vanilla/ld/emultempl/armelf.em binutils-2.22.52.0
--- binutils-2.22.52.0.4-vanilla/ld/emultempl/armelf.em 2012-06-05 18:44:10.000000000 +0200
+++ binutils-2.22.52.0.4/ld/emultempl/armelf.em 2012-06-08 13:34:30.578427241 +0200
@@ -52,6 +52,7 @@
- #endif /* not TARGET_ */
input_flags.dynamic = ${DYNAMIC_LINK-TRUE};
config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`;
+ config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`;
+ link_info.relro = TRUE;
}
diff --git a/binutils/patches/binutils-2.22.52.0.1-warn-textrel.patch b/binutils/patches/binutils-2.22.52.0.1-warn-textrel.patch
new file mode 100644
index 0000000..72a0477
--- /dev/null
+++ b/binutils/patches/binutils-2.22.52.0.1-warn-textrel.patch
@@ -0,0 +1,51 @@
+textrels are bad for forcing copy-on-write (this affects everyone),
+and for security/runtime code generation, this affects security ppl.
+But in either case, it doesn't matter who needs textrels, it's
+the very fact that they're needed at all.
+
+2006-06-10 Ned Ludd <solar(a)gentoo.org>, Mike Frysinger <vapier(a)gentoo.org>
+
+ * bfd/elflink.c (bfd_elf_final_link): Check all objects for TEXTRELs.
+ * ld/ldmain.c (main): Change textrel warning default to true.
+ * ld/testsuite/lib/ld-lib.exp (default_ld_simple_link): Scrub TEXTREL
+ warnings from ld output.
+
+--- a/bfd/elflink.c
++++ b/bfd/elflink.c
+@@ -8652,7 +8652,7 @@ bfd_elf_final_link (bfd *abfd, struct bf
+ goto error_return;
+
+ /* Check for DT_TEXTREL (late, in case the backend removes it). */
+- if (((info->warn_shared_textrel && info->shared)
++ if ((info->warn_shared_textrel
+ || info->error_textrel)
+ && (o = bfd_get_section_by_name (dynobj, ".dynamic")) != NULL)
+ {
+@@ -8702,7 +8702,7 @@ bfd_elf_final_link (bfd *abfd, struct bf
+ (_("%P%X: read-only segment has dynamic relocations.\n"));
+ else
+ info->callbacks->einfo
+- (_("%P: warning: creating a DT_TEXTREL in a shared object.\n"));
++ (_("%P: warning: creating a DT_TEXTREL in object.\n"));
+ break;
+ }
+ }
+--- a/ld/ldmain.c
++++ b/ld/ldmain.c
+@@ -282,2 +282,3 @@ main (int argc, char **argv)
+ link_info.spare_dynamic_tags = 5;
++ link_info.warn_shared_textrel = TRUE;
+ link_info.sharable_sections = FALSE;
+--- a/ld/testsuite/lib/ld-lib.exp
++++ b/ld/testsuite/lib/ld-lib.exp
+@@ -181,6 +181,10 @@ proc default_ld_simple_link { ld target
+ # symbol, since the default linker script might use ENTRY.
+ regsub -all "(^|\n)(\[^\n\]*: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output
+
++ # Gentoo tweak:
++ # We want to ignore TEXTREL warnings since we force enable them by default
++ regsub -all "^lt-ld-new: warning: creating a DT_TEXTREL in object\." $exec_output "\\1" exec_output
++
+ if [string match "" $exec_output] then {
+ return 1
+ } else {
diff --git a/binutils/patches/binutils-2.23.51.0.5-pt-pax-flags-20121112.patch b/binutils/patches/binutils-2.23.51.0.5-pt-pax-flags-20121112.patch
deleted file mode 100644
index 9b476c3..0000000
--- a/binutils/patches/binutils-2.23.51.0.5-pt-pax-flags-20121112.patch
+++ /dev/null
@@ -1,1105 +0,0 @@
---- binutils-2.23.51.0.5/bfd/elf-bfd.h
-+++ binutils-2.23.51.0.5/bfd/elf-bfd.h
-@@ -1577,6 +1577,9 @@ struct elf_obj_tdata
- /* Segment flags for the PT_GNU_STACK segment. */
- unsigned int stack_flags;
-
-+ /* Segment flags for the PT_PAX_FLAGS segment. */
-+ unsigned int pax_flags;
-+
- /* Symbol version definitions in external objects. */
- Elf_Internal_Verdef *verdef;
-
---- binutils-2.23.51.0.5/bfd/elf.c
-+++ binutils-2.23.51.0.5/bfd/elf.c
-@@ -1158,6 +1158,7 @@ get_segment_type (unsigned int p_type)
- case PT_GNU_EH_FRAME: pt = "EH_FRAME"; break;
- case PT_GNU_STACK: pt = "STACK"; break;
- case PT_GNU_RELRO: pt = "RELRO"; break;
-+ case PT_PAX_FLAGS: pt = "PAX_FLAGS"; break;
- default: pt = NULL; break;
- }
- return pt;
-@@ -2477,6 +2478,9 @@ bfd_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int hdr_index)
- case PT_GNU_RELRO:
- return _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "relro");
-
-+ case PT_PAX_FLAGS:
-+ return _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "pax_flags");
-+
- default:
- /* Check for any processor-specific program segment types. */
- bed = get_elf_backend_data (abfd);
-@@ -3551,6 +3555,11 @@ get_program_header_size (bfd *abfd, struct bfd_link_info *info)
- ++segs;
- }
-
-+ {
-+ /* We need a PT_PAX_FLAGS segment. */
-+ ++segs;
-+ }
-+
- for (s = abfd->sections; s != NULL; s = s->next)
- {
- if ((s->flags & SEC_LOAD) != 0
-@@ -4153,6 +4162,20 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
- }
- }
-
-+ {
-+ amt = sizeof (struct elf_segment_map);
-+ m = bfd_zalloc (abfd, amt);
-+ if (m == NULL)
-+ goto error_return;
-+ m->next = NULL;
-+ m->p_type = PT_PAX_FLAGS;
-+ m->p_flags = elf_tdata (abfd)->pax_flags;
-+ m->p_flags_valid = 1;
-+
-+ *pm = m;
-+ pm = &m->next;
-+ }
-+
- free (sections);
- elf_tdata (abfd)->segment_map = mfirst;
- }
-@@ -5417,7 +5440,8 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
- 6. PT_TLS segment includes only SHF_TLS sections.
- 7. SHF_TLS sections are only in PT_TLS or PT_LOAD segments.
- 8. PT_DYNAMIC should not contain empty sections at the beginning
-- (with the possible exception of .dynamic). */
-+ (with the possible exception of .dynamic).
-+ 9. PT_PAX_FLAGS segments do not include any sections. */
- #define IS_SECTION_IN_INPUT_SEGMENT(section, segment, bed) \
- ((((segment->p_paddr \
- ? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \
-@@ -5425,6 +5449,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
- && (section->flags & SEC_ALLOC) != 0) \
- || IS_NOTE (segment, section)) \
- && segment->p_type != PT_GNU_STACK \
-+ && segment->p_type != PT_PAX_FLAGS \
- && (segment->p_type != PT_TLS \
- || (section->flags & SEC_THREAD_LOCAL)) \
- && (segment->p_type == PT_LOAD \
---- binutils-2.23.51.0.5/bfd/elflink.c
-+++ binutils-2.23.51.0.5/bfd/elflink.c
-@@ -5545,17 +5545,30 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
- && ! (*bed->elf_backend_always_size_sections) (output_bfd, info))
- return FALSE;
-
-+ elf_tdata (output_bfd)->pax_flags = PF_NORANDEXEC;
-+ if (info->execheap)
-+ elf_tdata (output_bfd)->pax_flags |= PF_NOMPROTECT;
-+ else if (info->noexecheap)
-+ elf_tdata (output_bfd)->pax_flags |= PF_MPROTECT;
-+
- /* Determine any GNU_STACK segment requirements, after the backend
- has had a chance to set a default segment size. */
- if (info->execstack)
-- elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
-+ {
-+ elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
-+ elf_tdata (output_bfd)->pax_flags |= PF_EMUTRAMP;
-+ }
- else if (info->noexecstack)
-- elf_tdata (output_bfd)->stack_flags = PF_R | PF_W;
-+ {
-+ elf_tdata (output_bfd)->stack_flags = PF_R | PF_W;
-+ elf_tdata (output_bfd)->pax_flags |= PF_NOEMUTRAMP;
-+ }
- else
- {
- bfd *inputobj;
- asection *notesec = NULL;
- int exec = 0;
-
-+ elf_tdata (output_bfd)->pax_flags |= PF_NOEMUTRAMP;
- for (inputobj = info->input_bfds;
- inputobj;
- inputobj = inputobj->link_next)
-@@ -5567,7 +5581,11 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
- if (s)
- {
- if (s->flags & SEC_CODE)
-- exec = PF_X;
-+ {
-+ elf_tdata (output_bfd)->pax_flags &= ~PF_NOEMUTRAMP;
-+ elf_tdata (output_bfd)->pax_flags |= PF_EMUTRAMP;
-+ exec = PF_X;
-+ }
- notesec = s;
- }
- else if (bed->default_execstack)
---- binutils-2.23.51.0.5/binutils/readelf.c
-+++ binutils-2.23.51.0.5/binutils/readelf.c
-@@ -2740,6 +2740,7 @@ get_segment_type (unsigned long p_type)
- return "GNU_EH_FRAME";
- case PT_GNU_STACK: return "GNU_STACK";
- case PT_GNU_RELRO: return "GNU_RELRO";
-+ case PT_PAX_FLAGS: return "PAX_FLAGS";
-
- default:
- if ((p_type >= PT_LOPROC) && (p_type <= PT_HIPROC))
---- binutils-2.23.51.0.5/include/bfdlink.h
-+++ binutils-2.23.51.0.5/include/bfdlink.h
-@@ -322,6 +322,14 @@ struct bfd_link_info
- /* TRUE if PT_GNU_RELRO segment should be created. */
- unsigned int relro: 1;
-
-+ /* TRUE if PT_PAX_FLAGS segment should be created with PF_NOMPROTECT
-+ flags. */
-+ unsigned int execheap: 1;
-+
-+ /* TRUE if PT_PAX_FLAGS segment should be created with PF_MPROTECT
-+ flags. */
-+ unsigned int noexecheap: 1;
-+
- /* TRUE if .eh_frame_hdr section and PT_GNU_EH_FRAME ELF segment
- should be created. */
- unsigned int eh_frame_hdr: 1;
---- binutils-2.23.51.0.5/include/elf/common.h
-+++ binutils-2.23.51.0.5/include/elf/common.h
-@@ -429,6 +429,7 @@
- #define PT_SUNW_EH_FRAME PT_GNU_EH_FRAME /* Solaris uses the same value */
- #define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */
- #define PT_GNU_RELRO (PT_LOOS + 0x474e552) /* Read-only after relocation */
-+#define PT_PAX_FLAGS (PT_LOOS + 0x5041580) /* PaX flags */
- #define PT_GNU_SHR (PT_LOOS + 0x474e554) /* Sharable segment */
-
- /* Program segment permissions, in program header p_flags field. */
-@@ -439,6 +440,21 @@
- #define PF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */
- #define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */
-
-+/* Flags to control PaX behavior. */
-+
-+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */
-+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */
-+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */
-+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */
-+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */
-+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */
-+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */
-+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */
-+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */
-+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */
-+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */
-+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */
-+
- /* Values for section header, sh_type field. */
-
- #define SHT_NULL 0 /* Section header table entry unused */
---- binutils-2.23.51.0.5/ld/emultempl/elf32.em
-+++ binutils-2.23.51.0.5/ld/emultempl/elf32.em
-@@ -2285,6 +2285,16 @@ fragment <<EOF
- link_info.noexecstack = TRUE;
- link_info.execstack = FALSE;
- }
-+ else if (strcmp (optarg, "execheap") == 0)
-+ {
-+ link_info.execheap = TRUE;
-+ link_info.noexecheap = FALSE;
-+ }
-+ else if (strcmp (optarg, "noexecheap") == 0)
-+ {
-+ link_info.noexecheap = TRUE;
-+ link_info.execheap = FALSE;
-+ }
- EOF
- if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
- fragment <<EOF
-@@ -2368,6 +2378,8 @@ fragment <<EOF
- -z defs Report unresolved symbols in object files.\n"));
- fprintf (file, _("\
- -z execstack Mark executable as requiring executable stack\n"));
-+ fprintf (file, _("\
-+ -z execheap Mark executable as requiring executable heap\n"));
- EOF
-
- if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
-@@ -2391,6 +2403,8 @@ fragment <<EOF
- fragment <<EOF
- fprintf (file, _("\
- -z noexecstack Mark executable as not requiring executable stack\n"));
-+ fprintf (file, _("\
-+ -z noexecheap Mark executable as not requiring executable heap\n"));
- EOF
- if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
- fragment <<EOF
---- binutils-2.23.51.0.5/ld/ldgram.y
-+++ binutils-2.23.51.0.5/ld/ldgram.y
-@@ -1119,6 +1119,8 @@ phdr_type:
- $$ = exp_intop (0x6474e550);
- else if (strcmp (s, "PT_GNU_STACK") == 0)
- $$ = exp_intop (0x6474e551);
-+ else if (strcmp (s, "PT_PAX_FLAGS") == 0)
-+ $$ = exp_intop (0x65041580);
- else
- {
- einfo (_("\
---- binutils-2.23.51.0.5/ld/testsuite/ld-alpha/tlsbin.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-alpha/tlsbin.rd
-@@ -35,13 +35,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
-
- Program Headers:
- Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
-- PHDR +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+150 R E 0x8
-+ PHDR +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+188 R E 0x8
- INTERP +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1
- .*Requesting program interpreter.*
- LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R E 0x10000
- LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000
- DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8
- TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x4
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- #...
-
- Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 3 entries:
---- binutils-2.23.51.0.5/ld/testsuite/ld-alpha/tlsbinr.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-alpha/tlsbinr.rd
-@@ -42,6 +42,7 @@ Program Headers:
- +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000
- +DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8
- +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x4
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- #...
-
- Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
---- binutils-2.23.51.0.5/ld/testsuite/ld-alpha/tlspic.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-alpha/tlspic.rd
-@@ -38,6 +38,7 @@ Program Headers:
- +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000
- +DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8
- +TLS +0x0+10e0 0x0+110e0 0x0+110e0 0x0+60 0x0+80 R +0x4
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- #...
-
- Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 7 entries:
---- binutils-2.23.51.0.5/ld/testsuite/ld-elf/eh1.d
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-elf/eh1.d
-@@ -22,11 +22,11 @@ Contents of the .eh_frame section:
- DW_CFA_nop
- DW_CFA_nop
-
--00000018 0000001c 0000001c FDE cie=00000000 pc=00400078..00400078
-- DW_CFA_advance_loc: 0 to 00400078
-+00000018 0000001c 0000001c FDE cie=00000000 pc=([0-9a-f]+)..\1
-+ DW_CFA_advance_loc: 0 to [0-9a-f]+
- DW_CFA_def_cfa_offset: 16
- DW_CFA_offset: r6 \(rbp\) at cfa-16
-- DW_CFA_advance_loc: 0 to 00400078
-+ DW_CFA_advance_loc: 0 to [0-9a-f]+
- DW_CFA_def_cfa_register: r6 \(rbp\)
-
- 00000038 ZERO terminator
---- binutils-2.23.51.0.5/ld/testsuite/ld-elf/eh2.d
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-elf/eh2.d
-@@ -22,11 +22,11 @@ Contents of the .eh_frame section:
- DW_CFA_nop
- DW_CFA_nop
-
--00000018 0000001c 0000001c FDE cie=00000000 pc=00400078..00400078
-- DW_CFA_advance_loc: 0 to 00400078
-+00000018 0000001c 0000001c FDE cie=00000000 pc=([0-9a-f]+)..\1
-+ DW_CFA_advance_loc: 0 to [0-9a-f]+
- DW_CFA_def_cfa_offset: 16
- DW_CFA_offset: r6 \(rbp\) at cfa-16
-- DW_CFA_advance_loc: 0 to 00400078
-+ DW_CFA_advance_loc: 0 to [0-9a-f]+
- DW_CFA_def_cfa_register: r6 \(rbp\)
-
- 00000038 ZERO terminator
---- binutils-2.23.51.0.5/ld/testsuite/ld-elf/eh3.d
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-elf/eh3.d
-@@ -22,11 +22,11 @@ Contents of the .eh_frame section:
- DW_CFA_nop
- DW_CFA_nop
-
--00000018 0000001c 0000001c FDE cie=00000000 pc=00400078..00400078
-- DW_CFA_advance_loc: 0 to 00400078
-+00000018 0000001c 0000001c FDE cie=00000000 pc=([0-9a-f]+)..\1
-+ DW_CFA_advance_loc: 0 to [0-9a-f]+
- DW_CFA_def_cfa_offset: 16
- DW_CFA_offset: r6 \(rbp\) at cfa-16
-- DW_CFA_advance_loc: 0 to 00400078
-+ DW_CFA_advance_loc: 0 to [0-9a-f]+
- DW_CFA_def_cfa_register: r6 \(rbp\)
-
- 00000038 ZERO terminator
---- binutils-2.23.51.0.5/ld/testsuite/ld-elf/orphan-region.d
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-elf/orphan-region.d
-@@ -15,7 +15,9 @@
- Program Headers:
- Type.*
- LOAD[ \t]+0x[0-9a-f]+ 0x0*40000000 0x0*40000000 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x[0-9a-f]+
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
-
- Section to Segment mapping:
- Segment Sections...
- 00 .text .rodata .moredata *
-+ 01 +
---- binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsbin.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsbin.rd
-@@ -44,6 +44,7 @@ Program Headers:
- +LOAD.*
- +DYNAMIC.*
- +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+a0 R +0x1000
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
-
- Section to Segment mapping:
- +Segment Sections...
-@@ -53,6 +54,7 @@ Program Headers:
- +03 +.tdata .dynamic .got .got.plt *
- +04 +.dynamic *
- +05 +.tdata .tbss *
-+ +06 +
-
- Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries:
- Offset +Info +Type +Sym.Value +Sym. Name
---- binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsbindesc.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsbindesc.rd
-@@ -42,6 +42,7 @@ Program Headers:
- +LOAD.*
- +DYNAMIC.*
- +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+a0 R +0x1000
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
-
- Section to Segment mapping:
- +Segment Sections...
-@@ -51,6 +52,7 @@ Program Headers:
- +03 +.tdata .dynamic .got .got.plt *
- +04 +.dynamic *
- +05 +.tdata .tbss *
-+ +06 +
-
- Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries:
- Offset +Info +Type +Sym.Value +Sym. Name
---- binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsdesc.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsdesc.rd
-@@ -39,6 +39,7 @@ Program Headers:
- +LOAD.*
- +DYNAMIC.*
- +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+80 R +0x1
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
-
- Section to Segment mapping:
- +Segment Sections...
-@@ -46,6 +47,7 @@ Program Headers:
- +01 +.tdata .dynamic .got .got.plt *
- +02 +.dynamic *
- +03 +.tdata .tbss *
-+ +04 +
-
- Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries:
- Offset +Info +Type +Sym.Value +Sym. Name
---- binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsgdesc.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsgdesc.rd
-@@ -36,12 +36,14 @@ Program Headers:
- +LOAD.*
- +LOAD.*
- +DYNAMIC.*
-+ +PAX_FLAGS.*
-
- Section to Segment mapping:
- +Segment Sections...
- +00 +.hash .dynsym .dynstr .rel.dyn .rel.plt .plt .text *
- +01 +.dynamic .got .got.plt *
- +02 +.dynamic *
-+ +03 +
-
- Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 8 entries:
- Offset +Info +Type +Sym.Value +Sym. Name
---- binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsnopic.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsnopic.rd
-@@ -37,6 +37,7 @@ Program Headers:
- +LOAD.*
- +DYNAMIC.*
- +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+ 0x0+24 R +0x1
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
-
- Section to Segment mapping:
- +Segment Sections...
-@@ -44,6 +45,7 @@ Program Headers:
- +01 +.dynamic .got .got.plt *
- +02 +.dynamic *
- +03 +.tbss *
-+ +04 +
-
- Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries:
- Offset +Info +Type +Sym.Value +Sym. Name
---- binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlspic.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlspic.rd
-@@ -40,6 +40,7 @@ Program Headers:
- +LOAD.*
- +DYNAMIC.*
- +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+80 R +0x1
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
-
- Section to Segment mapping:
- +Segment Sections...
-@@ -47,6 +48,7 @@ Program Headers:
- +01 +.tdata .dynamic .got .got.plt *
- +02 +.dynamic *
- +03 +.tdata .tbss *
-+ +04 +
-
- Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 26 entries:
- Offset +Info +Type +Sym.Value +Sym. Name
---- binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge1.d
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge1.d
-@@ -4,7 +4,7 @@
- #objdump: -d
-
- #...
--0+1e0 <.text>:
-+[a-f0-9]+ <.text>:
- [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
- [ ]*[a-f0-9]+: c0 c0 04 00 48 00 addl r12=24,r1
- [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
---- binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge2.d
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge2.d
-@@ -4,7 +4,7 @@
- #objdump: -d
-
- #...
--0+1e0 <.text>:
-+[a-f0-9]+ <.text>:
- [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
- [ ]*[a-f0-9]+: c0 c0 04 00 48 00 addl r12=24,r1
- [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
---- binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge3.d
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge3.d
-@@ -4,7 +4,7 @@
- #objdump: -d
-
- #...
--0+210 <.text>:
-+[a-f0-9]+ <.text>:
- [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
- [ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1
- [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
---- binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge4.d
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge4.d
-@@ -4,7 +4,7 @@
- #objdump: -d
-
- #...
--0+240 <.text>:
-+[a-f0-9]+ <.text>:
- [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
- [ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1
- [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
---- binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge5.d
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge5.d
-@@ -4,7 +4,7 @@
- #objdump: -d
-
- #...
--0+270 <.text>:
-+[a-f0-9]+ <.text>:
- [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
- [ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1
- [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
---- binutils-2.23.51.0.5/ld/testsuite/ld-ia64/tlsbin.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-ia64/tlsbin.rd
-@@ -36,13 +36,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
-
- Program Headers:
- +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
-- +PHDR +0x0+40 0x40+40 0x40+40 0x0+188 0x0+188 R E 0x8
-- +INTERP +0x0+1c8 0x40+1c8 0x40+1c8 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1
-+ +PHDR +0x0+40 0x40+40 0x40+40 (0x[0-9a-f]+) \1 R E 0x8
-+ +INTERP +0x0+([0-9a-f]+) (0x40+\1) \2 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1
- .*Requesting program interpreter.*
- +LOAD +0x0+ 0x40+ 0x40+ 0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ R E 0x10000
- +LOAD +0x0+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x0+0[0-9a-f]+ 0x0+0[0-9a-f]+ RW +0x10000
- +DYNAMIC +0x0+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x0+150 0x0+150 RW +0x8
- +TLS +0x0+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x0+60 0x0+a0 R +0x4
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- +IA_64_UNWIND .* R +0x8
- #...
-
---- binutils-2.23.51.0.5/ld/testsuite/ld-ia64/tlspic.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-ia64/tlspic.rd
-@@ -40,6 +40,7 @@ Program Headers:
- +LOAD +0x0+1[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+0[0-9a-f]+ 0x0+0[0-9a-f]+ RW +0x10000
- +DYNAMIC +0x0+1[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+140 0x0+140 RW +0x8
- +TLS +0x0+1[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+60 0x0+80 R +0x4
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- +IA_64_UNWIND +0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ 0x0+18 0x0+18 R +0x8
- #...
-
---- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
-@@ -8,9 +8,9 @@
- .*: +file format.*
-
- Disassembly of section \.text:
--004000b0 <[^>]*> 3c1c0043 lui gp,0x43
--004000b4 <[^>]*> 279c9ff0 addiu gp,gp,-24592
--004000b8 <[^>]*> afbc0008 sw gp,8\(sp\)
-+004000d0 <[^>]*> 3c1c0043 lui gp,0x43
-+004000d4 <[^>]*> 279c9ff0 addiu gp,gp,-24592
-+004000d8 <[^>]*> afbc0008 sw gp,8\(sp\)
- #...
- 00408d60 <[^>]*> 3c1c0043 lui gp,0x43
- 00408d64 <[^>]*> 279c2c98 addiu gp,gp,11416
---- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.sd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.sd
-@@ -1,7 +1,7 @@
-
- Elf file type is DYN \(Shared object file\)
- Entry point .*
--There are 5 program headers, starting at offset .*
-+There are [0-9] program headers, starting at offset .*
-
- Program Headers:
- * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
-@@ -9,6 +9,7 @@ Program Headers:
- * LOAD * [^ ]+ * 0x0+00000 * 0x0+00000 [^ ]+ * [^ ]+ * R E * 0x.*
- * LOAD * [^ ]+ * 0x0+10000 * 0x0+10000 [^ ]+ * [^ ]+ * RW * 0x.*
- * DYNAMIC * [^ ]+ * 0x0+00400 * 0x0+00400 .*
-+ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- * NULL * .*
-
- *Section to Segment mapping:
-@@ -18,3 +19,4 @@ Program Headers:
- *0*2 * \.data \.got *
- *0*3 * \.dynamic *
- *0*4 *
-+ *0*5 *
---- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.sd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.sd
-@@ -1,7 +1,7 @@
-
- Elf file type is EXEC \(Executable file\)
- Entry point 0x44000
--There are 8 program headers, starting at offset .*
-+There are [0-9] program headers, starting at offset .*
-
- Program Headers:
- * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
-@@ -13,6 +13,7 @@ Program Headers:
- * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
- * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
- * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
-+ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- * NULL * .*
-
- *Section to Segment mapping:
-@@ -25,3 +26,4 @@ Program Headers:
- *0*5 *\.got \.data *
- *0*6 *\.dynamic *
- *0*7 *
-+ *0*8 *
---- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.sd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.sd
-@@ -1,7 +1,7 @@
-
- Elf file type is EXEC \(Executable file\)
- Entry point 0x44000
--There are 8 program headers, starting at offset .*
-+There are [0-9] program headers, starting at offset .*
-
- Program Headers:
- * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
-@@ -13,6 +13,7 @@ Program Headers:
- * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
- * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
- * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
-+ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- * NULL * .*
-
- *Section to Segment mapping:
-@@ -25,3 +26,4 @@ Program Headers:
- *0*5 * \.got \.data \.bss *
- *0*6 * \.dynamic *
- *0*7 *
-+ *0*8 *
---- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.sd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.sd
-@@ -1,7 +1,7 @@
-
- Elf file type is EXEC \(Executable file\)
- Entry point 0x44000
--There are 8 program headers, starting at offset .*
-+There are [0-9] program headers, starting at offset .*
-
- Program Headers:
- * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
-@@ -13,6 +13,7 @@ Program Headers:
- * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
- * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
- * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
-+ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- * NULL * .*
-
- *Section to Segment mapping:
-@@ -25,3 +26,4 @@ Program Headers:
- *0*5 * \.got \.data \.bss *
- *0*6 * \.dynamic *
- *0*7 *
-+ *0*8 *
---- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.sd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.sd
-@@ -1,7 +1,7 @@
-
- Elf file type is EXEC \(Executable file\)
- Entry point 0x44000
--There are 8 program headers, starting at offset .*
-+There are [0-9] program headers, starting at offset .*
-
- Program Headers:
- * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
-@@ -13,6 +13,7 @@ Program Headers:
- * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
- * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
- * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
-+ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- * NULL * .*
-
- *Section to Segment mapping:
-@@ -25,3 +26,4 @@ Program Headers:
- *0*5 * \.got \.data \.bss *
- *0*6 * \.dynamic *
- *0*7 *
-+ *0*8 *
---- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.sd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.sd
-@@ -1,7 +1,7 @@
-
- Elf file type is EXEC \(Executable file\)
- Entry point 0x44000
--There are 7 program headers, starting at offset .*
-+There are [0-9] program headers, starting at offset .*
-
- Program Headers:
- * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
-@@ -12,6 +12,7 @@ Program Headers:
- * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
- * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
- * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
-+ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- * NULL * .*
-
- *Section to Segment mapping:
-@@ -23,3 +24,4 @@ Program Headers:
- *0*4 * \.got \.data \.bss *
- *0*5 * \.dynamic *
- *0*6 *
-+ *0*7 *
---- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.sd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.sd
-@@ -1,7 +1,7 @@
-
- Elf file type is EXEC \(Executable file\)
- Entry point 0x44000
--There are 8 program headers, starting at offset .*
-+There are [0-9] program headers, starting at offset .*
-
- Program Headers:
- * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
-@@ -13,6 +13,7 @@ Program Headers:
- * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
- * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
- * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
-+ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- * NULL * .*
-
- *Section to Segment mapping:
-@@ -25,3 +26,4 @@ Program Headers:
- *0*5 * \.got \.data \.bss *
- *0*6 * \.dynamic *
- *0*7 *
-+ *0*8 *
---- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/tlsbin-o32.d
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/tlsbin-o32.d
-@@ -2,42 +2,42 @@
-
- Disassembly of section .text:
-
--004000d0 <__start>:
-- 4000d0: 3c1c0fc0 lui gp,0xfc0
-- 4000d4: 279c7f30 addiu gp,gp,32560
-- 4000d8: 0399e021 addu gp,gp,t9
-- 4000dc: 27bdfff0 addiu sp,sp,-16
-- 4000e0: afbe0008 sw s8,8\(sp\)
-- 4000e4: 03a0f021 move s8,sp
-- 4000e8: afbc0000 sw gp,0\(sp\)
-- 4000ec: 8f998018 lw t9,-32744\(gp\)
-- 4000f0: 27848028 addiu a0,gp,-32728
-- 4000f4: 0320f809 jalr t9
-- 4000f8: 00000000 nop
-- 4000fc: 8fdc0000 lw gp,0\(s8\)
-- 400100: 00000000 nop
-- 400104: 8f998018 lw t9,-32744\(gp\)
-- 400108: 27848020 addiu a0,gp,-32736
-- 40010c: 0320f809 jalr t9
-- 400110: 00000000 nop
-- 400114: 8fdc0000 lw gp,0\(s8\)
-- 400118: 00401021 move v0,v0
-- 40011c: 3c030000 lui v1,0x0
-- 400120: 24638000 addiu v1,v1,-32768
-- 400124: 00621821 addu v1,v1,v0
-- 400128: 7c02283b rdhwr v0,\$5
-- 40012c: 8f83801c lw v1,-32740\(gp\)
-- 400130: 00000000 nop
-- 400134: 00621821 addu v1,v1,v0
-- 400138: 7c02283b rdhwr v0,\$5
-- 40013c: 3c030000 lui v1,0x0
-- 400140: 24639004 addiu v1,v1,-28668
-- 400144: 00621821 addu v1,v1,v0
-- 400148: 03c0e821 move sp,s8
-- 40014c: 8fbe0008 lw s8,8\(sp\)
-- 400150: 03e00008 jr ra
-- 400154: 27bd0010 addiu sp,sp,16
-+00400[0-9a-f]{3} <__start>:
-+ 400[0-9a-f]{3}: 3c1c0fc0 lui gp,0xfc0
-+ 400[0-9a-f]{3}: 279c7f30 addiu gp,gp,32560
-+ 400[0-9a-f]{3}: 0399e021 addu gp,gp,t9
-+ 400[0-9a-f]{3}: 27bdfff0 addiu sp,sp,-16
-+ 400[0-9a-f]{3}: afbe0008 sw s8,8\(sp\)
-+ 400[0-9a-f]{3}: 03a0f021 move s8,sp
-+ 400[0-9a-f]{3}: afbc0000 sw gp,0\(sp\)
-+ 400[0-9a-f]{3}: 8f998018 lw t9,-32744\(gp\)
-+ 400[0-9a-f]{3}: 27848028 addiu a0,gp,-32728
-+ 400[0-9a-f]{3}: 0320f809 jalr t9
-+ 400[0-9a-f]{3}: 00000000 nop
-+ 400[0-9a-f]{3}: 8fdc0000 lw gp,0\(s8\)
-+ 400[0-9a-f]{3}: 00000000 nop
-+ 400[0-9a-f]{3}: 8f998018 lw t9,-32744\(gp\)
-+ 400[0-9a-f]{3}: 27848020 addiu a0,gp,-32736
-+ 400[0-9a-f]{3}: 0320f809 jalr t9
-+ 400[0-9a-f]{3}: 00000000 nop
-+ 400[0-9a-f]{3}: 8fdc0000 lw gp,0\(s8\)
-+ 400[0-9a-f]{3}: 00401021 move v0,v0
-+ 400[0-9a-f]{3}: 3c030000 lui v1,0x0
-+ 400[0-9a-f]{3}: 24638000 addiu v1,v1,-32768
-+ 400[0-9a-f]{3}: 00621821 addu v1,v1,v0
-+ 400[0-9a-f]{3}: 7c02283b rdhwr v0,\$5
-+ 400[0-9a-f]{3}: 8f83801c lw v1,-32740\(gp\)
-+ 400[0-9a-f]{3}: 00000000 nop
-+ 400[0-9a-f]{3}: 00621821 addu v1,v1,v0
-+ 400[0-9a-f]{3}: 7c02283b rdhwr v0,\$5
-+ 400[0-9a-f]{3}: 3c030000 lui v1,0x0
-+ 400[0-9a-f]{3}: 24639004 addiu v1,v1,-28668
-+ 400[0-9a-f]{3}: 00621821 addu v1,v1,v0
-+ 400[0-9a-f]{3}: 03c0e821 move sp,s8
-+ 400[0-9a-f]{3}: 8fbe0008 lw s8,8\(sp\)
-+ 400[0-9a-f]{3}: 03e00008 jr ra
-+ 400[0-9a-f]{3}: 27bd0010 addiu sp,sp,16
-
--00400158 <__tls_get_addr>:
-- 400158: 03e00008 jr ra
-- 40015c: 00000000 nop
-+00400[0-9a-f]{3} <__tls_get_addr>:
-+ 400[0-9a-f]{3}: 03e00008 jr ra
-+ 400[0-9a-f]{3}: 00000000 nop
---- binutils-2.23.51.0.5/ld/testsuite/ld-powerpc/tlsexe32.r
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-powerpc/tlsexe32.r
-@@ -33,13 +33,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
-
- Program Headers:
- +Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz +Flg Align
-- +PHDR +0x000034 0x01800034 0x01800034 0x000c0 0x000c0 R E 0x4
-- +INTERP +0x0000f4 0x018000f4 0x018000f4 0x00011 0x00011 R +0x1
-+ +PHDR +0x000034 0x01800034 0x01800034 (0x000[0-9a-f]{2}) \1 R E 0x4
-+ +INTERP +0x000([0-9a-f]{3}) 0x01800\1 0x01800\1 0x00011 0x00011 R +0x1
- +\[Requesting program interpreter: .*\]
- +LOAD .* R E 0x10000
- +LOAD .* RWE 0x10000
- +DYNAMIC .* RW +0x4
- +TLS .* 0x0001c 0x00038 R +0x4
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
-
- Section to Segment mapping:
- +Segment Sections\.\.\.
-@@ -49,6 +50,7 @@ Program Headers:
- +03 +\.tdata \.dynamic \.got \.plt
- +04 +\.dynamic
- +05 +\.tdata \.tbss
-+ +06 +
-
- Relocation section '\.rela\.dyn' at offset .* contains 2 entries:
- Offset +Info +Type +Sym\. Value +Symbol's Name \+ Addend
---- binutils-2.23.51.0.5/ld/testsuite/ld-powerpc/tlsso32.r
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-powerpc/tlsso32.r
-@@ -35,6 +35,7 @@ Program Headers:
- +LOAD .* RWE 0x10000
- +DYNAMIC .* RW +0x4
- +TLS .* 0x0+1c 0x0+38 R +0x4
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
-
- Section to Segment mapping:
- +Segment Sections\.\.\.
-@@ -42,6 +43,7 @@ Program Headers:
- +01 +\.tdata \.dynamic \.got \.plt
- +02 +\.dynamic
- +03 +\.tdata \.tbss
-+ +04 +
-
- Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 18 entries:
- Offset +Info +Type +Sym\. Value +Symbol's Name \+ Addend
-@@ -52,9 +54,9 @@ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 18 entries:
- [0-9a-f ]+R_PPC_TPREL16 +0+30 +le0 \+ 0
- [0-9a-f ]+R_PPC_TPREL16_HA +0+34 +le1 \+ 0
- [0-9a-f ]+R_PPC_TPREL16_LO +0+34 +le1 \+ 0
--[0-9a-f ]+R_PPC_TPREL16 +0+103d0 +\.tdata \+ 103e4
--[0-9a-f ]+R_PPC_TPREL16_HA +0+103d0 +\.tdata \+ 103e8
--[0-9a-f ]+R_PPC_TPREL16_LO +0+103d0 +\.tdata \+ 103e8
-+[0-9a-f ]+R_PPC_TPREL16 +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3}
-+[0-9a-f ]+R_PPC_TPREL16_HA +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3}
-+[0-9a-f ]+R_PPC_TPREL16_LO +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3}
- [0-9a-f ]+R_PPC_DTPMOD32 +0
- [0-9a-f ]+R_PPC_DTPREL32 +0
- [0-9a-f ]+R_PPC_DTPMOD32 +0
---- binutils-2.23.51.0.5/ld/testsuite/ld-s390/tlsbin.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-s390/tlsbin.rd
-@@ -36,6 +36,7 @@ There are [0-9]+ program headers, starting at offset [0-9]+
- +LOAD .* RW +0x1000
- +DYNAMIC .* RW +0x4
- +TLS .* 0x0+60 0x0+a0 R +0x20
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
-
- Section to Segment mapping:
- +Segment Sections...
-@@ -52,6 +53,7 @@ Program Headers:
- +03 +.tdata .dynamic .got *
- +04 +.dynamic *
- +05 +.tdata .tbss *
-+ +06 +
-
- Relocation section '.rela.dyn' at offset .* contains 4 entries:
- Offset +Info +Type +Sym.Value +Sym. Name \+ Addend
---- binutils-2.23.51.0.5/ld/testsuite/ld-s390/tlsbin_64.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-s390/tlsbin_64.rd
-@@ -36,6 +36,7 @@ There are [0-9]+ program headers, starting at offset [0-9]+
- +LOAD .* RW +0x1000
- +DYNAMIC .* RW +0x8
- +TLS .* 0x0+60 0x0+a0 R +0x20
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
-
- Section to Segment mapping:
- +Segment Sections...
-@@ -52,6 +53,7 @@ Program Headers:
- +03 +.tdata .dynamic .got *
- +04 +.dynamic *
- +05 +.tdata .tbss *
-+ +06 +
-
- Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
- +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
---- binutils-2.23.51.0.5/ld/testsuite/ld-s390/tlspic.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-s390/tlspic.rd
-@@ -39,6 +39,7 @@ Program Headers:
- +LOAD .* RW +0x1000
- +DYNAMIC .* RW +0x4
- +TLS .* 0x0+60 0x0+80 R +0x20
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
-
- Section to Segment mapping:
- +Segment Sections...
-@@ -46,6 +47,7 @@ Program Headers:
- +01 +.tdata .dynamic .got
- +02 +.dynamic
- +03 +.tdata .tbss
-+ +04 +
-
- Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
- Offset +Info +Type +Sym.Value +Sym. Name \+ Addend
---- binutils-2.23.51.0.5/ld/testsuite/ld-s390/tlspic_64.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-s390/tlspic_64.rd
-@@ -39,6 +39,7 @@ Program Headers:
- +LOAD .* RW +0x1000
- +DYNAMIC .* RW +0x8
- +TLS .* 0x0+60 0x0+80 R +0x20
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
-
- Section to Segment mapping:
- +Segment Sections...
-@@ -46,6 +47,7 @@ Program Headers:
- +01 +.tdata .dynamic .got *
- +02 +.dynamic *
- +03 +.tdata .tbss *
-+ +04 +
-
- Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
- +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
---- binutils-2.23.51.0.5/ld/testsuite/ld-sh/tlsbin-2.d
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-sh/tlsbin-2.d
-@@ -44,6 +44,7 @@ Program Headers:
- +LOAD.*
- +DYNAMIC.*
- +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+18 0x0+28 R +0x4
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
-
- Section to Segment mapping:
- +Segment Sections\.\.\.
-@@ -53,6 +54,7 @@ Program Headers:
- +03 +\.tdata \.dynamic \.got *
- +04 +\.dynamic *
- +05 +\.tdata \.tbss *
-+ +06 +
-
- Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
- Offset +Info +Type +Sym\.Value +Sym\. Name \+ Addend
---- binutils-2.23.51.0.5/ld/testsuite/ld-sh/tlspic-2.d
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-sh/tlspic-2.d
-@@ -32,7 +32,7 @@ Key to Flags:
-
- Elf file type is DYN \(Shared object file\)
- Entry point 0x[0-9a-f]+
--There are 4 program headers, starting at offset [0-9]+
-+There are [0-9] program headers, starting at offset [0-9]+
-
- Program Headers:
- +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
-@@ -40,6 +40,7 @@ Program Headers:
- +LOAD.*
- +DYNAMIC.*
- +TLS .* 0x0+18 0x0+20 R +0x4
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
-
- Section to Segment mapping:
- +Segment Sections\.\.\.
-@@ -47,6 +48,7 @@ Program Headers:
- +01 +\.tdata \.dynamic \.got *
- +02 +\.dynamic *
- +03 +\.tdata \.tbss *
-+ +04 +
-
- Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 10 entries:
- Offset +Info +Type +Sym\.Value +Sym\. Name \+ Addend
---- binutils-2.23.51.0.5/ld/testsuite/ld-sparc/gotop32.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-sparc/gotop32.rd
-@@ -31,6 +31,7 @@ Program Headers:
- +LOAD +0x0+ 0x0+ 0x0+ 0x0+2000 0x0+2000 R E 0x10000
- +LOAD +0x0+2000 0x0+12000 0x0+12000 0x0+2000 0x0+2000 RW +0x10000
- +DYNAMIC +0x0+2000 0x0+12000 0x0+12000 0x0+70 0x0+70 RW +0x4
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- #...
-
- Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
---- binutils-2.23.51.0.5/ld/testsuite/ld-sparc/gotop64.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-sparc/gotop64.rd
-@@ -31,6 +31,7 @@ Program Headers:
- +LOAD +0x0+ 0x0+ 0x0+ 0x0+2000 0x0+2000 R E 0x100000
- +LOAD +0x0+2000 0x0+102000 0x0+102000 0x0+2000 0x0+2000 RW +0x100000
- +DYNAMIC +0x0+2000 0x0+102000 0x0+102000 0x0+e0 0x0+e0 RW +0x8
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- #...
-
- Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
---- binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunbin32.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunbin32.rd
-@@ -30,13 +30,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
-
- Program Headers:
- +Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz +Flg Align
-- +PHDR +0x0+34 0x0+10034 0x0+10034 0x0+c0 0x0+c0 R E 0x4
-- +INTERP +0x0+f4 0x0+100f4 0x0+100f4 0x0+11 0x0+11 R +0x1
-+ +PHDR +0x0+34 0x0+10034 0x0+10034 (0x[0-9a-f]+) \1 R E 0x4
-+ +INTERP +(0x[0-9a-f]+ ){3}0x0+11 0x0+11 R +0x1
- .*Requesting program interpreter.*
- +LOAD .* R E 0x10000
- +LOAD .* RW +0x10000
- +DYNAMIC .* RW +0x4
- +TLS .* 0x0+1060 0x0+10a0 R +0x4
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- #...
-
- Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
---- binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunbin64.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunbin64.rd
-@@ -30,13 +30,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
-
- Program Headers:
- +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
-- +PHDR +0x0+40 0x0+100040 0x0+100040 0x0+150 0x0+150 R E 0x8
-- +INTERP +0x0+190 0x0+100190 0x0+100190 0x0+19 0x0+19 R +0x1
-+ +PHDR +0x0+40 0x0+100040 0x0+100040 (0x[0-9a-f]+) \1 R E 0x8
-+ +INTERP +0x0+([0-9a-f]+) (0x0+10+\1) \2 0x0+19 0x0+19 R +0x1
- .*Requesting program interpreter.*
- +LOAD .* R E 0x100000
- +LOAD .* RW +0x100000
- +DYNAMIC .* RW +0x8
- +TLS .* 0x0+60 0x0+a0 R +0x4
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- #...
-
- Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
---- binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunnopic32.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunnopic32.rd
-@@ -32,6 +32,7 @@ Program Headers:
- +LOAD .* RW +0x10000
- +DYNAMIC .* RW +0x4
- +TLS .* 0x0+ 0x0+24 R +0x4
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- #...
-
- Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 12 entries:
---- binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunnopic64.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunnopic64.rd
-@@ -32,6 +32,7 @@ Program Headers:
- +LOAD .* RW +0x100000
- +DYNAMIC .* RW +0x8
- +TLS .* 0x0+ 0x0+24 R +0x4
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- #...
-
- Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
---- binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunpic32.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunpic32.rd
-@@ -36,6 +36,7 @@ Program Headers:
- +LOAD +0x0+2000 0x0+12000 0x0+12000 0x0+184 0x0+184 RWE 0x10000
- +DYNAMIC +0x0+2060 0x0+12060 0x0+12060 0x0+98 0x0+98 RW +0x4
- +TLS +0x0+2000 0x0+12000 0x0+12000 0x0+60 0x0+80 R +0x4
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- #...
-
- Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
---- binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunpic64.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunpic64.rd
-@@ -36,6 +36,7 @@ Program Headers:
- +LOAD +0x0+2000 0x0+102000 0x0+102000 0x0+3a0 0x0+3a0 RWE 0x100000
- +DYNAMIC +0x0+2060 0x0+102060 0x0+102060 0x0+130 0x0+130 RW +0x8
- +TLS +0x0+2000 0x0+102000 0x0+102000 0x0+60 0x0+80 R +0x4
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
- #...
-
- Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
---- binutils-2.23.51.0.5/ld/testsuite/ld-x86-64/tlsgdesc.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-x86-64/tlsgdesc.rd
-@@ -36,12 +36,14 @@ Program Headers:
- +LOAD.*
- +LOAD.*
- +DYNAMIC.*
-+ +PAX_FLAGS.*
-
- Section to Segment mapping:
- +Segment Sections...
- +00 +.hash .dynsym .dynstr .rela.dyn .rela.plt .plt .text *
- +01 +.dynamic .got .got.plt *
- +02 +.dynamic *
-+ +03 +
-
- Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 8 entries:
- +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
---- binutils-2.23.51.0.5/ld/testsuite/ld-x86-64/tlspic.rd
-+++ binutils-2.23.51.0.5/ld/testsuite/ld-x86-64/tlspic.rd
-@@ -40,6 +40,7 @@ Program Headers:
- +LOAD +0x0+11ac 0x0+2011ac 0x0+2011ac 0x0+244 0x0+244 RW +0x200000
- +DYNAMIC +0x0+1210 0x0+201210 0x0+201210 0x0+130 0x0+130 RW +0x8
- +TLS +0x0+11ac 0x0+2011ac 0x0+2011ac 0x0+60 0x0+80 R +0x1
-+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
-
- Section to Segment mapping:
- +Segment Sections...
-@@ -47,6 +48,7 @@ Program Headers:
- +01 +.tdata .dynamic .got .got.plt *
- +02 +.dynamic *
- +03 +.tdata .tbss *
-+ +04 +
-
- Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
- +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
diff --git a/binutils/patches/binutils-2.23.52.0.1-as-doc-texinfo-fixes.patch0 b/binutils/patches/binutils-2.23.52.0.1-as-doc-texinfo-fixes.patch0
new file mode 100644
index 0000000..d0b657f
--- /dev/null
+++ b/binutils/patches/binutils-2.23.52.0.1-as-doc-texinfo-fixes.patch0
@@ -0,0 +1,279 @@
+diff -cp ../binutils-2.23.52.0.1.orig/gas/doc/c-arc.texi gas/doc/c-arc.texi
+*** ../binutils-2.23.52.0.1.orig/gas/doc/c-arc.texi 2013-03-04 08:25:32.051931944 +0000
+--- gas/doc/c-arc.texi 2013-03-04 08:26:19.234930452 +0000
+*************** The extension instructions are not macro
+*** 220,226 ****
+ encodings for use of these instructions according to the specification
+ by the user. The parameters are:
+
+! @table @bullet
+ @item @var{name}
+ Name of the extension instruction
+
+--- 220,226 ----
+ encodings for use of these instructions according to the specification
+ by the user. The parameters are:
+
+! @table @code
+ @item @var{name}
+ Name of the extension instruction
+
+diff -cp ../binutils-2.23.52.0.1.orig/gas/doc/c-arm.texi gas/doc/c-arm.texi
+*** ../binutils-2.23.52.0.1.orig/gas/doc/c-arm.texi 2013-03-04 08:25:32.039931945 +0000
+--- gas/doc/c-arm.texi 2013-03-04 08:27:37.462927978 +0000
+*************** ARM and THUMB instructions had their own
+*** 390,418 ****
+ @code{unified} syntax, which can be selected via the @code{.syntax}
+ directive, and has the following main features:
+
+! @table @bullet
+! @item
+ Immediate operands do not require a @code{#} prefix.
+
+! @item
+ The @code{IT} instruction may appear, and if it does it is validated
+ against subsequent conditional affixes. In ARM mode it does not
+ generate machine code, in THUMB mode it does.
+
+! @item
+ For ARM instructions the conditional affixes always appear at the end
+ of the instruction. For THUMB instructions conditional affixes can be
+ used, but only inside the scope of an @code{IT} instruction.
+
+! @item
+ All of the instructions new to the V6T2 architecture (and later) are
+ available. (Only a few such instructions can be written in the
+ @code{divided} syntax).
+
+! @item
+ The @code{.N} and @code{.W} suffixes are recognized and honored.
+
+! @item
+ All instructions set the flags if and only if they have an @code{s}
+ affix.
+ @end table
+--- 390,418 ----
+ @code{unified} syntax, which can be selected via the @code{.syntax}
+ directive, and has the following main features:
+
+! @table @code
+! @item 1
+ Immediate operands do not require a @code{#} prefix.
+
+! @item 2
+ The @code{IT} instruction may appear, and if it does it is validated
+ against subsequent conditional affixes. In ARM mode it does not
+ generate machine code, in THUMB mode it does.
+
+! @item 3
+ For ARM instructions the conditional affixes always appear at the end
+ of the instruction. For THUMB instructions conditional affixes can be
+ used, but only inside the scope of an @code{IT} instruction.
+
+! @item 4
+ All of the instructions new to the V6T2 architecture (and later) are
+ available. (Only a few such instructions can be written in the
+ @code{divided} syntax).
+
+! @item 5
+ The @code{.N} and @code{.W} suffixes are recognized and honored.
+
+! @item 6
+ All instructions set the flags if and only if they have an @code{s}
+ affix.
+ @end table
+*************** Either @samp{#} or @samp{$} can be used
+*** 451,478 ****
+ @cindex register names, ARM
+ *TODO* Explain about ARM register naming, and the predefined names.
+
+- @node ARM-Neon-Alignment
+- @subsection NEON Alignment Specifiers
+-
+- @cindex alignment for NEON instructions
+- Some NEON load/store instructions allow an optional address
+- alignment qualifier.
+- The ARM documentation specifies that this is indicated by
+- @samp{@@ @var{align}}. However GAS already interprets
+- the @samp{@@} character as a "line comment" start,
+- so @samp{: @var{align}} is used instead. For example:
+-
+- @smallexample
+- vld1.8 @{q0@}, [r0, :128]
+- @end smallexample
+-
+- @node ARM Floating Point
+- @section Floating Point
+-
+- @cindex floating point, ARM (@sc{ieee})
+- @cindex ARM floating point (@sc{ieee})
+- The ARM family uses @sc{ieee} floating-point numbers.
+-
+ @node ARM-Relocations
+ @subsection ARM relocation generation
+
+--- 451,456 ----
+*************** respectively. For example to load the 3
+*** 519,524 ****
+--- 497,524 ----
+ MOVT r0, #:upper16:foo
+ @end smallexample
+
++ @node ARM-Neon-Alignment
++ @subsection NEON Alignment Specifiers
++
++ @cindex alignment for NEON instructions
++ Some NEON load/store instructions allow an optional address
++ alignment qualifier.
++ The ARM documentation specifies that this is indicated by
++ @samp{@@ @var{align}}. However GAS already interprets
++ the @samp{@@} character as a "line comment" start,
++ so @samp{: @var{align}} is used instead. For example:
++
++ @smallexample
++ vld1.8 @{q0@}, [r0, :128]
++ @end smallexample
++
++ @node ARM Floating Point
++ @section Floating Point
++
++ @cindex floating point, ARM (@sc{ieee})
++ @cindex ARM floating point (@sc{ieee})
++ The ARM family uses @sc{ieee} floating-point numbers.
++
+ @node ARM Directives
+ @section ARM Machine Directives
+
+diff -cp ../binutils-2.23.52.0.1.orig/gas/doc/c-cr16.texi gas/doc/c-cr16.texi
+*** ../binutils-2.23.52.0.1.orig/gas/doc/c-cr16.texi 2013-03-04 08:25:32.086931943 +0000
+--- gas/doc/c-cr16.texi 2013-03-04 08:28:09.304926971 +0000
+*************** Operand expression type qualifier is an
+*** 44,69 ****
+ CR16 target operand qualifiers and its size (in bits):
+
+ @table @samp
+! @item Immediate Operand
+! - s ---- 4 bits
+! @item
+! - m ---- 16 bits, for movb and movw instructions.
+! @item
+! - m ---- 20 bits, movd instructions.
+! @item
+! - l ---- 32 bits
+!
+! @item Absolute Operand
+! - s ---- Illegal specifier for this operand.
+! @item
+! - m ---- 20 bits, movd instructions.
+!
+! @item Displacement Operand
+! - s ---- 8 bits
+! @item
+! - m ---- 16 bits
+! @item
+! - l ---- 24 bits
+ @end table
+
+ For example:
+--- 44,76 ----
+ CR16 target operand qualifiers and its size (in bits):
+
+ @table @samp
+! @item Immediate Operand: s
+! 4 bits.
+!
+! @item Immediate Operand: m
+! 16 bits, for movb and movw instructions.
+!
+! @item Immediate Operand: m
+! 20 bits, movd instructions.
+!
+! @item Immediate Operand: l
+! 32 bits.
+!
+! @item Absolute Operand: s
+! Illegal specifier for this operand.
+!
+! @item Absolute Operand: m
+! 20 bits, movd instructions.
+!
+! @item Displacement Operand: s
+! 8 bits.
+!
+! @item Displacement Operand: m
+! 16 bits.
+!
+! @item Displacement Operand: l
+! 24 bits.
+!
+ @end table
+
+ For example:
+diff -cp ../binutils-2.23.52.0.1.orig/gas/doc/c-tic54x.texi gas/doc/c-tic54x.texi
+*** ../binutils-2.23.52.0.1.orig/gas/doc/c-tic54x.texi 2013-03-04 08:25:32.035931945 +0000
+--- gas/doc/c-tic54x.texi 2013-03-04 08:28:38.186926057 +0000
+*************** In this example, x is replaced with SYM2
+*** 109,115 ****
+ is replaced with x. At this point, x has already been encountered
+ and the substitution stops.
+
+! @smallexample @code
+ .asg "x",SYM1
+ .asg "SYM1",SYM2
+ .asg "SYM2",x
+--- 109,115 ----
+ is replaced with x. At this point, x has already been encountered
+ and the substitution stops.
+
+! @smallexample
+ .asg "x",SYM1
+ .asg "SYM1",SYM2
+ .asg "SYM2",x
+*************** Substitution may be forced in situations
+*** 126,139 ****
+ ambiguous by placing colons on either side of the subsym. The following
+ code:
+
+! @smallexample @code
+ .eval "10",x
+ LAB:X: add #x, a
+ @end smallexample
+
+ When assembled becomes:
+
+! @smallexample @code
+ LAB10 add #10, a
+ @end smallexample
+
+--- 126,139 ----
+ ambiguous by placing colons on either side of the subsym. The following
+ code:
+
+! @smallexample
+ .eval "10",x
+ LAB:X: add #x, a
+ @end smallexample
+
+ When assembled becomes:
+
+! @smallexample
+ LAB10 add #10, a
+ @end smallexample
+
+*************** The @code{LDX} pseudo-op is provided for
+*** 309,315 ****
+ of a label or address. For example, if an address @code{_label} resides
+ in extended program memory, the value of @code{_label} may be loaded as
+ follows:
+! @smallexample @code
+ ldx #_label,16,a ; loads extended bits of _label
+ or #_label,a ; loads lower 16 bits of _label
+ bacc a ; full address is in accumulator A
+--- 309,315 ----
+ of a label or address. For example, if an address @code{_label} resides
+ in extended program memory, the value of @code{_label} may be loaded as
+ follows:
+! @smallexample
+ ldx #_label,16,a ; loads extended bits of _label
+ or #_label,a ; loads lower 16 bits of _label
+ bacc a ; full address is in accumulator A
diff --git a/binutils/patches/binutils-2.23.52.0.1-hardened-crtbegin.patch b/binutils/patches/binutils-2.23.52.0.1-hardened-crtbegin.patch
new file mode 100644
index 0000000..996bce5
--- /dev/null
+++ b/binutils/patches/binutils-2.23.52.0.1-hardened-crtbegin.patch
@@ -0,0 +1,39 @@
+https://bugs.gentoo.org/391899
+https://bugs.gentoo.org/393321
+
+Make sure the default ELF linker script does the right thing with our customer
+PIE+PIC gcc objects (until we get a chance to rename them).
+
+2011-12-05 Magnus Granberg <zorry(a)gentoo.org>, Alphat-PC <AlphatPC(a)gmail.com>
+
+ * scripttempl/elf.sc: Add support for crtbeginTS.o
+
+--- a/ld/scripttempl/elf.sc
++++ b/ld/scripttempl/elf.sc
+@@ -225,8 +225,8 @@
+ if test "${ENABLE_INITFINI_ARRAY}" = "yes"; then
+ SORT_INIT_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))"
+ SORT_FINI_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))"
+- CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors"
+- DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors"
++ CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtbeginTS.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors"
++ DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtbeginTS.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors"
+ else
+ SORT_INIT_ARRAY="KEEP (*(SORT(.init_array.*)))"
+ SORT_FINI_ARRAY="KEEP (*(SORT(.fini_array.*)))"
+@@ -264,6 +264,7 @@
+
+ KEEP (*crtbegin.o(.ctors))
+ KEEP (*crtbegin?.o(.ctors))
++ KEEP (*crtbeginTS.o(.ctors))
+
+ /* We don't want to include the .ctor section from
+ the crtend.o file until after the sorted ctors.
+@@ -280,6 +281,7 @@
+ ${CONSTRUCTING+${DTOR_START}}
+ KEEP (*crtbegin.o(.dtors))
+ KEEP (*crtbegin?.o(.dtors))
++ KEEP (*crtbeginTS.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*(.dtors))
diff --git a/binutils/patches/binutils-2.23.52.0.1-pt-pax-flags-20130326.patch b/binutils/patches/binutils-2.23.52.0.1-pt-pax-flags-20130326.patch
new file mode 100644
index 0000000..b173b2a
--- /dev/null
+++ b/binutils/patches/binutils-2.23.52.0.1-pt-pax-flags-20130326.patch
@@ -0,0 +1,1030 @@
+--- binutils-2.23.52.0.1/bfd/elf-bfd.h
++++ binutils-2.23.52.0.1/bfd/elf-bfd.h
+@@ -1577,6 +1577,9 @@ struct elf_obj_tdata
+ /* Segment flags for the PT_GNU_STACK segment. */
+ unsigned int stack_flags;
+
++ /* Segment flags for the PT_PAX_FLAGS segment. */
++ unsigned int pax_flags;
++
+ /* This is set to TRUE if the object was created by the backend
+ linker. */
+ bfd_boolean linker;
+@@ -1707,6 +1707,7 @@
+ #define elf_eh_frame_hdr(bfd) (elf_tdata(bfd) -> o->eh_frame_hdr)
+ #define elf_linker(bfd) (elf_tdata(bfd) -> o->linker)
+ #define elf_stack_flags(bfd) (elf_tdata(bfd) -> o->stack_flags)
++#define elf_pax_flags(bfd) (elf_tdata(bfd) -> o->pax_flags)
+ #define elf_shstrtab(bfd) (elf_tdata(bfd) -> o->strtab_ptr)
+ #define elf_onesymtab(bfd) (elf_tdata(bfd) -> symtab_section)
+ #define elf_symtab_shndx(bfd) (elf_tdata(bfd) -> symtab_shndx_section)
+--- binutils-2.23.52.0.1/bfd/elf.c
++++ binutils-2.23.52.0.1/bfd/elf.c
+@@ -1158,6 +1158,7 @@ get_segment_type (unsigned int p_type)
+ case PT_GNU_EH_FRAME: pt = "EH_FRAME"; break;
+ case PT_GNU_STACK: pt = "STACK"; break;
+ case PT_GNU_RELRO: pt = "RELRO"; break;
++ case PT_PAX_FLAGS: pt = "PAX_FLAGS"; break;
+ default: pt = NULL; break;
+ }
+ return pt;
+@@ -2477,6 +2478,9 @@ bfd_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int hdr_index)
+ case PT_GNU_RELRO:
+ return _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "relro");
+
++ case PT_PAX_FLAGS:
++ return _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "pax_flags");
++
+ default:
+ /* Check for any processor-specific program segment types. */
+ bed = get_elf_backend_data (abfd);
+@@ -3551,6 +3555,11 @@ get_program_header_size (bfd *abfd, struct bfd_link_info *info)
+ ++segs;
+ }
+
++ {
++ /* We need a PT_PAX_FLAGS segment. */
++ ++segs;
++ }
++
+ for (s = abfd->sections; s != NULL; s = s->next)
+ {
+ if ((s->flags & SEC_LOAD) != 0
+@@ -4153,6 +4162,20 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
+ }
+ }
+
++ {
++ amt = sizeof (struct elf_segment_map);
++ m = bfd_zalloc (abfd, amt);
++ if (m == NULL)
++ goto error_return;
++ m->next = NULL;
++ m->p_type = PT_PAX_FLAGS;
++ m->p_flags = elf_pax_flags (abfd);
++ m->p_flags_valid = 1;
++
++ *pm = m;
++ pm = &m->next;
++ }
++
+ free (sections);
+ elf_tdata (abfd)->segment_map = mfirst;
+ }
+@@ -5417,7 +5440,8 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
+ 6. PT_TLS segment includes only SHF_TLS sections.
+ 7. SHF_TLS sections are only in PT_TLS or PT_LOAD segments.
+ 8. PT_DYNAMIC should not contain empty sections at the beginning
+- (with the possible exception of .dynamic). */
++ (with the possible exception of .dynamic).
++ 9. PT_PAX_FLAGS segments do not include any sections. */
+ #define IS_SECTION_IN_INPUT_SEGMENT(section, segment, bed) \
+ ((((segment->p_paddr \
+ ? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \
+@@ -5425,6 +5449,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
+ && (section->flags & SEC_ALLOC) != 0) \
+ || IS_NOTE (segment, section)) \
+ && segment->p_type != PT_GNU_STACK \
++ && segment->p_type != PT_PAX_FLAGS \
+ && (segment->p_type != PT_TLS \
+ || (section->flags & SEC_THREAD_LOCAL)) \
+ && (segment->p_type == PT_LOAD \
+--- binutils-2.23.52.0.1/bfd/elflink.c
++++ binutils-2.23.52.0.1/bfd/elflink.c
+@@ -5545,17 +5545,30 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
+ && ! (*bed->elf_backend_always_size_sections) (output_bfd, info))
+ return FALSE;
+
++ elf_pax_flags (output_bfd) = PF_NORANDEXEC;
++ if (info->execheap)
++ elf_pax_flags (output_bfd) |= PF_NOMPROTECT;
++ else if (info->noexecheap)
++ elf_pax_flags (output_bfd) |= PF_MPROTECT;
++
+ /* Determine any GNU_STACK segment requirements, after the backend
+ has had a chance to set a default segment size. */
+ if (info->execstack)
+- elf_stack_flags (output_bfd) = PF_R | PF_W | PF_X;
++ {
++ elf_stack_flags (output_bfd) = PF_R | PF_W | PF_X;
++ elf_pax_flags (output_bfd) |= PF_EMUTRAMP;
++ }
+ else if (info->noexecstack)
+- elf_stack_flags (output_bfd) = PF_R | PF_W;
++ {
++ elf_stack_flags (output_bfd) = PF_R | PF_W;
++ elf_pax_flags (output_bfd) |= PF_NOEMUTRAMP;
++ }
+ else
+ {
+ bfd *inputobj;
+ asection *notesec = NULL;
+ int exec = 0;
+
++ elf_pax_flags (output_bfd) |= PF_NOEMUTRAMP;
+ for (inputobj = info->input_bfds;
+ inputobj;
+ inputobj = inputobj->link_next)
+@@ -5567,7 +5581,11 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
+ if (s)
+ {
+ if (s->flags & SEC_CODE)
+- exec = PF_X;
++ {
++ elf_pax_flags (output_bfd) &= ~PF_NOEMUTRAMP;
++ elf_pax_flags (output_bfd) |= PF_EMUTRAMP;
++ exec = PF_X;
++ }
+ notesec = s;
+ }
+ else if (bed->default_execstack)
+--- binutils-2.23.52.0.1/binutils/readelf.c
++++ binutils-2.23.52.0.1/binutils/readelf.c
+@@ -2740,6 +2740,7 @@ get_segment_type (unsigned long p_type)
+ return "GNU_EH_FRAME";
+ case PT_GNU_STACK: return "GNU_STACK";
+ case PT_GNU_RELRO: return "GNU_RELRO";
++ case PT_PAX_FLAGS: return "PAX_FLAGS";
+
+ default:
+ if ((p_type >= PT_LOPROC) && (p_type <= PT_HIPROC))
+--- binutils-2.23.52.0.1/include/bfdlink.h
++++ binutils-2.23.52.0.1/include/bfdlink.h
+@@ -322,6 +322,14 @@ struct bfd_link_info
+ /* TRUE if PT_GNU_RELRO segment should be created. */
+ unsigned int relro: 1;
+
++ /* TRUE if PT_PAX_FLAGS segment should be created with PF_NOMPROTECT
++ flags. */
++ unsigned int execheap: 1;
++
++ /* TRUE if PT_PAX_FLAGS segment should be created with PF_MPROTECT
++ flags. */
++ unsigned int noexecheap: 1;
++
+ /* TRUE if .eh_frame_hdr section and PT_GNU_EH_FRAME ELF segment
+ should be created. */
+ unsigned int eh_frame_hdr: 1;
+--- binutils-2.23.52.0.1/include/elf/common.h
++++ binutils-2.23.52.0.1/include/elf/common.h
+@@ -429,6 +429,7 @@
+ #define PT_SUNW_EH_FRAME PT_GNU_EH_FRAME /* Solaris uses the same value */
+ #define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */
+ #define PT_GNU_RELRO (PT_LOOS + 0x474e552) /* Read-only after relocation */
++#define PT_PAX_FLAGS (PT_LOOS + 0x5041580) /* PaX flags */
+ #define PT_GNU_SHR (PT_LOOS + 0x474e554) /* Sharable segment */
+
+ /* Program segment permissions, in program header p_flags field. */
+@@ -439,6 +440,21 @@
+ #define PF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */
+ #define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */
+
++/* Flags to control PaX behavior. */
++
++#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */
++#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */
++#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */
++#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */
++#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */
++#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */
++#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */
++#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */
++#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */
++#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */
++#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */
++#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */
++
+ /* Values for section header, sh_type field. */
+
+ #define SHT_NULL 0 /* Section header table entry unused */
+--- binutils-2.23.52.0.1/ld/emultempl/elf32.em
++++ binutils-2.23.52.0.1/ld/emultempl/elf32.em
+@@ -2285,6 +2285,16 @@ fragment <<EOF
+ link_info.noexecstack = TRUE;
+ link_info.execstack = FALSE;
+ }
++ else if (strcmp (optarg, "execheap") == 0)
++ {
++ link_info.execheap = TRUE;
++ link_info.noexecheap = FALSE;
++ }
++ else if (strcmp (optarg, "noexecheap") == 0)
++ {
++ link_info.noexecheap = TRUE;
++ link_info.execheap = FALSE;
++ }
+ EOF
+ if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
+ fragment <<EOF
+@@ -2368,6 +2378,8 @@ fragment <<EOF
+ -z defs Report unresolved symbols in object files.\n"));
+ fprintf (file, _("\
+ -z execstack Mark executable as requiring executable stack\n"));
++ fprintf (file, _("\
++ -z execheap Mark executable as requiring executable heap\n"));
+ EOF
+
+ if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
+@@ -2391,6 +2403,8 @@ fragment <<EOF
+ fragment <<EOF
+ fprintf (file, _("\
+ -z noexecstack Mark executable as not requiring executable stack\n"));
++ fprintf (file, _("\
++ -z noexecheap Mark executable as not requiring executable heap\n"));
+ EOF
+ if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
+ fragment <<EOF
+--- binutils-2.23.52.0.1/ld/ldgram.y
++++ binutils-2.23.52.0.1/ld/ldgram.y
+@@ -1119,6 +1119,8 @@ phdr_type:
+ $$ = exp_intop (0x6474e550);
+ else if (strcmp (s, "PT_GNU_STACK") == 0)
+ $$ = exp_intop (0x6474e551);
++ else if (strcmp (s, "PT_PAX_FLAGS") == 0)
++ $$ = exp_intop (0x65041580);
+ else
+ {
+ einfo (_("\
+--- binutils-2.23.52.0.1/ld/testsuite/ld-alpha/tlsbin.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-alpha/tlsbin.rd
+@@ -35,13 +35,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
+
+ Program Headers:
+ Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+- PHDR +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+150 R E 0x8
++ PHDR +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+188 R E 0x8
+ INTERP +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1
+ .*Requesting program interpreter.*
+ LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R E 0x10000
+ LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000
+ DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8
+ TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 3 entries:
+--- binutils-2.23.52.0.1/ld/testsuite/ld-alpha/tlsbinr.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-alpha/tlsbinr.rd
+@@ -42,6 +42,7 @@ Program Headers:
+ +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000
+ +DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8
+ +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
+--- binutils-2.23.52.0.1/ld/testsuite/ld-alpha/tlspic.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-alpha/tlspic.rd
+@@ -38,6 +38,7 @@ Program Headers:
+ +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000
+ +DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8
+ +TLS +0x0+10e0 0x0+110e0 0x0+110e0 0x0+60 0x0+80 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 7 entries:
+--- binutils-2.23.52.0.1/ld/testsuite/ld-elf/eh1.d
++++ binutils-2.23.52.0.1/ld/testsuite/ld-elf/eh1.d
+@@ -22,11 +22,11 @@ Contents of the .eh_frame section:
+ DW_CFA_nop
+ DW_CFA_nop
+
+-00000018 0000001c 0000001c FDE cie=00000000 pc=00400078..00400078
+- DW_CFA_advance_loc: 0 to 00400078
++00000018 0000001c 0000001c FDE cie=00000000 pc=([0-9a-f]+)..\1
++ DW_CFA_advance_loc: 0 to [0-9a-f]+
+ DW_CFA_def_cfa_offset: 16
+ DW_CFA_offset: r6 \(rbp\) at cfa-16
+- DW_CFA_advance_loc: 0 to 00400078
++ DW_CFA_advance_loc: 0 to [0-9a-f]+
+ DW_CFA_def_cfa_register: r6 \(rbp\)
+
+ 00000038 ZERO terminator
+--- binutils-2.23.52.0.1/ld/testsuite/ld-elf/eh2.d
++++ binutils-2.23.52.0.1/ld/testsuite/ld-elf/eh2.d
+@@ -22,11 +22,11 @@ Contents of the .eh_frame section:
+ DW_CFA_nop
+ DW_CFA_nop
+
+-00000018 0000001c 0000001c FDE cie=00000000 pc=00400078..00400078
+- DW_CFA_advance_loc: 0 to 00400078
++00000018 0000001c 0000001c FDE cie=00000000 pc=([0-9a-f]+)..\1
++ DW_CFA_advance_loc: 0 to [0-9a-f]+
+ DW_CFA_def_cfa_offset: 16
+ DW_CFA_offset: r6 \(rbp\) at cfa-16
+- DW_CFA_advance_loc: 0 to 00400078
++ DW_CFA_advance_loc: 0 to [0-9a-f]+
+ DW_CFA_def_cfa_register: r6 \(rbp\)
+
+ 00000038 ZERO terminator
+--- binutils-2.23.52.0.1/ld/testsuite/ld-elf/eh3.d
++++ binutils-2.23.52.0.1/ld/testsuite/ld-elf/eh3.d
+@@ -22,11 +22,11 @@ Contents of the .eh_frame section:
+ DW_CFA_nop
+ DW_CFA_nop
+
+-00000018 0000001c 0000001c FDE cie=00000000 pc=00400078..00400078
+- DW_CFA_advance_loc: 0 to 00400078
++00000018 0000001c 0000001c FDE cie=00000000 pc=([0-9a-f]+)..\1
++ DW_CFA_advance_loc: 0 to [0-9a-f]+
+ DW_CFA_def_cfa_offset: 16
+ DW_CFA_offset: r6 \(rbp\) at cfa-16
+- DW_CFA_advance_loc: 0 to 00400078
++ DW_CFA_advance_loc: 0 to [0-9a-f]+
+ DW_CFA_def_cfa_register: r6 \(rbp\)
+
+ 00000038 ZERO terminator
+--- binutils-2.23.52.0.1/ld/testsuite/ld-elf/orphan-region.d
++++ binutils-2.23.52.0.1/ld/testsuite/ld-elf/orphan-region.d
+@@ -15,7 +15,9 @@
+ Program Headers:
+ Type.*
+ LOAD[ \t]+0x[0-9a-f]+ 0x0*40000000 0x0*40000000 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x[0-9a-f]+
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+
+ Section to Segment mapping:
+ Segment Sections...
+ 00 .text .rodata .moredata *
++ 01 +
+--- binutils-2.23.52.0.1/ld/testsuite/ld-i386/tlsbin.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-i386/tlsbin.rd
+@@ -44,6 +44,7 @@ Program Headers:
+ +LOAD.*
+ +DYNAMIC.*
+ +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+a0 R +0x1000
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+
+ Section to Segment mapping:
+ +Segment Sections...
+@@ -53,6 +54,7 @@ Program Headers:
+ +03 +.tdata .dynamic .got .got.plt *
+ +04 +.dynamic *
+ +05 +.tdata .tbss *
++ +06 +
+
+ Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name
+--- binutils-2.23.52.0.1/ld/testsuite/ld-i386/tlsbindesc.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-i386/tlsbindesc.rd
+@@ -42,6 +42,7 @@ Program Headers:
+ +LOAD.*
+ +DYNAMIC.*
+ +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+a0 R +0x1000
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+
+ Section to Segment mapping:
+ +Segment Sections...
+@@ -51,6 +52,7 @@ Program Headers:
+ +03 +.tdata .dynamic .got .got.plt *
+ +04 +.dynamic *
+ +05 +.tdata .tbss *
++ +06 +
+
+ Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name
+--- binutils-2.23.52.0.1/ld/testsuite/ld-i386/tlsdesc.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-i386/tlsdesc.rd
+@@ -39,6 +39,7 @@ Program Headers:
+ +LOAD.*
+ +DYNAMIC.*
+ +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+80 R +0x1
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+
+ Section to Segment mapping:
+ +Segment Sections...
+@@ -46,6 +47,7 @@ Program Headers:
+ +01 +.tdata .dynamic .got .got.plt *
+ +02 +.dynamic *
+ +03 +.tdata .tbss *
++ +04 +
+
+ Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name
+--- binutils-2.23.52.0.1/ld/testsuite/ld-i386/tlsgdesc.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-i386/tlsgdesc.rd
+@@ -36,12 +36,14 @@ Program Headers:
+ +LOAD.*
+ +LOAD.*
+ +DYNAMIC.*
++ +PAX_FLAGS.*
+
+ Section to Segment mapping:
+ +Segment Sections...
+ +00 +.hash .dynsym .dynstr .rel.dyn .rel.plt .plt .text *
+ +01 +.dynamic .got .got.plt *
+ +02 +.dynamic *
++ +03 +
+
+ Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 8 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name
+--- binutils-2.23.52.0.1/ld/testsuite/ld-i386/tlsnopic.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-i386/tlsnopic.rd
+@@ -37,6 +37,7 @@ Program Headers:
+ +LOAD.*
+ +DYNAMIC.*
+ +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+ 0x0+24 R +0x1
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+
+ Section to Segment mapping:
+ +Segment Sections...
+@@ -44,6 +45,7 @@ Program Headers:
+ +01 +.dynamic .got .got.plt *
+ +02 +.dynamic *
+ +03 +.tbss *
++ +04 +
+
+ Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name
+--- binutils-2.23.52.0.1/ld/testsuite/ld-i386/tlspic.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-i386/tlspic.rd
+@@ -40,6 +40,7 @@ Program Headers:
+ +LOAD.*
+ +DYNAMIC.*
+ +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+80 R +0x1
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+
+ Section to Segment mapping:
+ +Segment Sections...
+@@ -47,6 +48,7 @@ Program Headers:
+ +01 +.tdata .dynamic .got .got.plt *
+ +02 +.dynamic *
+ +03 +.tdata .tbss *
++ +04 +
+
+ Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 26 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name
+--- binutils-2.23.52.0.1/ld/testsuite/ld-ia64/merge1.d
++++ binutils-2.23.52.0.1/ld/testsuite/ld-ia64/merge1.d
+@@ -4,7 +4,7 @@
+ #objdump: -d
+
+ #...
+-0+1e0 <.text>:
++[a-f0-9]+ <.text>:
+ [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
+ [ ]*[a-f0-9]+: c0 c0 04 00 48 00 addl r12=24,r1
+ [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
+--- binutils-2.23.52.0.1/ld/testsuite/ld-ia64/merge2.d
++++ binutils-2.23.52.0.1/ld/testsuite/ld-ia64/merge2.d
+@@ -4,7 +4,7 @@
+ #objdump: -d
+
+ #...
+-0+1e0 <.text>:
++[a-f0-9]+ <.text>:
+ [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
+ [ ]*[a-f0-9]+: c0 c0 04 00 48 00 addl r12=24,r1
+ [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
+--- binutils-2.23.52.0.1/ld/testsuite/ld-ia64/merge3.d
++++ binutils-2.23.52.0.1/ld/testsuite/ld-ia64/merge3.d
+@@ -4,7 +4,7 @@
+ #objdump: -d
+
+ #...
+-0+210 <.text>:
++[a-f0-9]+ <.text>:
+ [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
+ [ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1
+ [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
+--- binutils-2.23.52.0.1/ld/testsuite/ld-ia64/merge4.d
++++ binutils-2.23.52.0.1/ld/testsuite/ld-ia64/merge4.d
+@@ -4,7 +4,7 @@
+ #objdump: -d
+
+ #...
+-0+240 <.text>:
++[a-f0-9]+ <.text>:
+ [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
+ [ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1
+ [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
+--- binutils-2.23.52.0.1/ld/testsuite/ld-ia64/merge5.d
++++ binutils-2.23.52.0.1/ld/testsuite/ld-ia64/merge5.d
+@@ -4,7 +4,7 @@
+ #objdump: -d
+
+ #...
+-0+270 <.text>:
++[a-f0-9]+ <.text>:
+ [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
+ [ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1
+ [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
+--- binutils-2.23.52.0.1/ld/testsuite/ld-ia64/tlsbin.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-ia64/tlsbin.rd
+@@ -36,13 +36,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
+
+ Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+- +PHDR +0x0+40 0x40+40 0x40+40 0x0+188 0x0+188 R E 0x8
+- +INTERP +0x0+1c8 0x40+1c8 0x40+1c8 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1
++ +PHDR +0x0+40 0x40+40 0x40+40 (0x[0-9a-f]+) \1 R E 0x8
++ +INTERP +0x0+([0-9a-f]+) (0x40+\1) \2 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1
+ .*Requesting program interpreter.*
+ +LOAD +0x0+ 0x40+ 0x40+ 0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ R E 0x10000
+ +LOAD +0x0+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x0+0[0-9a-f]+ 0x0+0[0-9a-f]+ RW +0x10000
+ +DYNAMIC +0x0+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x0+150 0x0+150 RW +0x8
+ +TLS +0x0+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x0+60 0x0+a0 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ +IA_64_UNWIND .* R +0x8
+ #...
+
+--- binutils-2.23.52.0.1/ld/testsuite/ld-ia64/tlspic.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-ia64/tlspic.rd
+@@ -40,6 +40,7 @@ Program Headers:
+ +LOAD +0x0+1[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+0[0-9a-f]+ 0x0+0[0-9a-f]+ RW +0x10000
+ +DYNAMIC +0x0+1[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+140 0x0+140 RW +0x8
+ +TLS +0x0+1[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+60 0x0+80 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ +IA_64_UNWIND +0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ 0x0+18 0x0+18 R +0x8
+ #...
+
+--- binutils-2.23.52.0.1/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
++++ binutils-2.23.52.0.1/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
+@@ -8,9 +8,9 @@
+ .*: +file format.*
+
+ Disassembly of section \.text:
+-004000b0 <[^>]*> 3c1c0043 lui gp,0x43
+-004000b4 <[^>]*> 279c9ff0 addiu gp,gp,-24592
+-004000b8 <[^>]*> afbc0008 sw gp,8\(sp\)
++004000d0 <[^>]*> 3c1c0043 lui gp,0x43
++004000d4 <[^>]*> 279c9ff0 addiu gp,gp,-24592
++004000d8 <[^>]*> afbc0008 sw gp,8\(sp\)
+ #...
+ 00408d60 <[^>]*> 3c1c0043 lui gp,0x43
+ 00408d64 <[^>]*> 279c2c98 addiu gp,gp,11416
+--- binutils-2.23.52.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.sd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.sd
+@@ -1,7 +1,7 @@
+
+ Elf file type is DYN \(Shared object file\)
+ Entry point .*
+-There are 5 program headers, starting at offset .*
++There are [0-9] program headers, starting at offset .*
+
+ Program Headers:
+ * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
+@@ -9,6 +9,7 @@ Program Headers:
+ * LOAD * [^ ]+ * 0x0+00000 * 0x0+00000 [^ ]+ * [^ ]+ * R E * 0x.*
+ * LOAD * [^ ]+ * 0x0+10000 * 0x0+10000 [^ ]+ * [^ ]+ * RW * 0x.*
+ * DYNAMIC * [^ ]+ * 0x0+00400 * 0x0+00400 .*
++ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ * NULL * .*
+
+ *Section to Segment mapping:
+@@ -18,3 +19,4 @@ Program Headers:
+ *0*2 * \.data \.got *
+ *0*3 * \.dynamic *
+ *0*4 *
++ *0*5 *
+--- binutils-2.23.52.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.sd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.sd
+@@ -1,7 +1,7 @@
+
+ Elf file type is EXEC \(Executable file\)
+ Entry point 0x44000
+-There are 8 program headers, starting at offset .*
++There are [0-9] program headers, starting at offset .*
+
+ Program Headers:
+ * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
+@@ -13,6 +13,7 @@ Program Headers:
+ * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
+ * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
+ * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
++ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ * NULL * .*
+
+ *Section to Segment mapping:
+@@ -25,3 +26,4 @@ Program Headers:
+ *0*5 *\.got \.data *
+ *0*6 *\.dynamic *
+ *0*7 *
++ *0*8 *
+--- binutils-2.23.52.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.sd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.sd
+@@ -1,7 +1,7 @@
+
+ Elf file type is EXEC \(Executable file\)
+ Entry point 0x44000
+-There are 8 program headers, starting at offset .*
++There are [0-9] program headers, starting at offset .*
+
+ Program Headers:
+ * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
+@@ -13,6 +13,7 @@ Program Headers:
+ * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
+ * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
+ * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
++ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ * NULL * .*
+
+ *Section to Segment mapping:
+@@ -25,3 +26,4 @@ Program Headers:
+ *0*5 * \.got \.data \.bss *
+ *0*6 * \.dynamic *
+ *0*7 *
++ *0*8 *
+--- binutils-2.23.52.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.sd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.sd
+@@ -1,7 +1,7 @@
+
+ Elf file type is EXEC \(Executable file\)
+ Entry point 0x44000
+-There are 8 program headers, starting at offset .*
++There are [0-9] program headers, starting at offset .*
+
+ Program Headers:
+ * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
+@@ -13,6 +13,7 @@ Program Headers:
+ * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
+ * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
+ * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
++ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ * NULL * .*
+
+ *Section to Segment mapping:
+@@ -25,3 +26,4 @@ Program Headers:
+ *0*5 * \.got \.data \.bss *
+ *0*6 * \.dynamic *
+ *0*7 *
++ *0*8 *
+--- binutils-2.23.52.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.sd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.sd
+@@ -1,7 +1,7 @@
+
+ Elf file type is EXEC \(Executable file\)
+ Entry point 0x44000
+-There are 8 program headers, starting at offset .*
++There are [0-9] program headers, starting at offset .*
+
+ Program Headers:
+ * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
+@@ -13,6 +13,7 @@ Program Headers:
+ * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
+ * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
+ * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
++ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ * NULL * .*
+
+ *Section to Segment mapping:
+@@ -25,3 +26,4 @@ Program Headers:
+ *0*5 * \.got \.data \.bss *
+ *0*6 * \.dynamic *
+ *0*7 *
++ *0*8 *
+--- binutils-2.23.52.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.sd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.sd
+@@ -1,7 +1,7 @@
+
+ Elf file type is EXEC \(Executable file\)
+ Entry point 0x44000
+-There are 7 program headers, starting at offset .*
++There are [0-9] program headers, starting at offset .*
+
+ Program Headers:
+ * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
+@@ -12,6 +12,7 @@ Program Headers:
+ * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
+ * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
+ * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
++ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ * NULL * .*
+
+ *Section to Segment mapping:
+@@ -23,3 +24,4 @@ Program Headers:
+ *0*4 * \.got \.data \.bss *
+ *0*5 * \.dynamic *
+ *0*6 *
++ *0*7 *
+--- binutils-2.23.52.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.sd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.sd
+@@ -1,7 +1,7 @@
+
+ Elf file type is EXEC \(Executable file\)
+ Entry point 0x44000
+-There are 8 program headers, starting at offset .*
++There are [0-9] program headers, starting at offset .*
+
+ Program Headers:
+ * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
+@@ -13,6 +13,7 @@ Program Headers:
+ * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
+ * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
+ * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
++ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ * NULL * .*
+
+ *Section to Segment mapping:
+@@ -25,3 +26,4 @@ Program Headers:
+ *0*5 * \.got \.data \.bss *
+ *0*6 * \.dynamic *
+ *0*7 *
++ *0*8 *
+--- binutils-2.23.52.0.1/ld/testsuite/ld-powerpc/tlsexe32.r
++++ binutils-2.23.52.0.1/ld/testsuite/ld-powerpc/tlsexe32.r
+@@ -33,13 +33,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
+
+ Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz +Flg Align
+- +PHDR +0x000034 0x01800034 0x01800034 0x000c0 0x000c0 R E 0x4
+- +INTERP +0x0000f4 0x018000f4 0x018000f4 0x00011 0x00011 R +0x1
++ +PHDR +0x000034 0x01800034 0x01800034 (0x000[0-9a-f]{2}) \1 R E 0x4
++ +INTERP +0x000([0-9a-f]{3}) 0x01800\1 0x01800\1 0x00011 0x00011 R +0x1
+ +\[Requesting program interpreter: .*\]
+ +LOAD .* R E 0x10000
+ +LOAD .* RWE 0x10000
+ +DYNAMIC .* RW +0x4
+ +TLS .* 0x0001c 0x00038 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+
+ Section to Segment mapping:
+ +Segment Sections\.\.\.
+@@ -49,6 +50,7 @@ Program Headers:
+ +03 +\.tdata \.dynamic \.got \.plt
+ +04 +\.dynamic
+ +05 +\.tdata \.tbss
++ +06 +
+
+ Relocation section '\.rela\.dyn' at offset .* contains 2 entries:
+ Offset +Info +Type +Sym\. Value +Symbol's Name \+ Addend
+--- binutils-2.23.52.0.1/ld/testsuite/ld-powerpc/tlsso32.r
++++ binutils-2.23.52.0.1/ld/testsuite/ld-powerpc/tlsso32.r
+@@ -35,6 +35,7 @@ Program Headers:
+ +LOAD .* RWE 0x10000
+ +DYNAMIC .* RW +0x4
+ +TLS .* 0x0+1c 0x0+38 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+
+ Section to Segment mapping:
+ +Segment Sections\.\.\.
+@@ -42,6 +43,7 @@ Program Headers:
+ +01 +\.tdata \.dynamic \.got \.plt
+ +02 +\.dynamic
+ +03 +\.tdata \.tbss
++ +04 +
+
+ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 18 entries:
+ Offset +Info +Type +Sym\. Value +Symbol's Name \+ Addend
+@@ -52,9 +54,9 @@ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 18 entries:
+ [0-9a-f ]+R_PPC_TPREL16 +0+30 +le0 \+ 0
+ [0-9a-f ]+R_PPC_TPREL16_HA +0+34 +le1 \+ 0
+ [0-9a-f ]+R_PPC_TPREL16_LO +0+34 +le1 \+ 0
+-[0-9a-f ]+R_PPC_TPREL16 +0+103d0 +\.tdata \+ 103e4
+-[0-9a-f ]+R_PPC_TPREL16_HA +0+103d0 +\.tdata \+ 103e8
+-[0-9a-f ]+R_PPC_TPREL16_LO +0+103d0 +\.tdata \+ 103e8
++[0-9a-f ]+R_PPC_TPREL16 +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3}
++[0-9a-f ]+R_PPC_TPREL16_HA +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3}
++[0-9a-f ]+R_PPC_TPREL16_LO +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3}
+ [0-9a-f ]+R_PPC_DTPMOD32 +0
+ [0-9a-f ]+R_PPC_DTPREL32 +0
+ [0-9a-f ]+R_PPC_DTPMOD32 +0
+--- binutils-2.23.52.0.1/ld/testsuite/ld-s390/tlsbin.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-s390/tlsbin.rd
+@@ -36,6 +36,7 @@ There are [0-9]+ program headers, starting at offset [0-9]+
+ +LOAD .* RW +0x1000
+ +DYNAMIC .* RW +0x4
+ +TLS .* 0x0+60 0x0+a0 R +0x20
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+
+ Section to Segment mapping:
+ +Segment Sections...
+@@ -52,6 +53,7 @@ Program Headers:
+ +03 +.tdata .dynamic .got *
+ +04 +.dynamic *
+ +05 +.tdata .tbss *
++ +06 +
+
+ Relocation section '.rela.dyn' at offset .* contains 4 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name \+ Addend
+--- binutils-2.23.52.0.1/ld/testsuite/ld-s390/tlsbin_64.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-s390/tlsbin_64.rd
+@@ -36,6 +36,7 @@ There are [0-9]+ program headers, starting at offset [0-9]+
+ +LOAD .* RW +0x1000
+ +DYNAMIC .* RW +0x8
+ +TLS .* 0x0+60 0x0+a0 R +0x20
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+
+ Section to Segment mapping:
+ +Segment Sections...
+@@ -52,6 +53,7 @@ Program Headers:
+ +03 +.tdata .dynamic .got *
+ +04 +.dynamic *
+ +05 +.tdata .tbss *
++ +06 +
+
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
+ +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
+--- binutils-2.23.52.0.1/ld/testsuite/ld-s390/tlspic.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-s390/tlspic.rd
+@@ -39,6 +39,7 @@ Program Headers:
+ +LOAD .* RW +0x1000
+ +DYNAMIC .* RW +0x4
+ +TLS .* 0x0+60 0x0+80 R +0x20
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+
+ Section to Segment mapping:
+ +Segment Sections...
+@@ -46,6 +47,7 @@ Program Headers:
+ +01 +.tdata .dynamic .got
+ +02 +.dynamic
+ +03 +.tdata .tbss
++ +04 +
+
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name \+ Addend
+--- binutils-2.23.52.0.1/ld/testsuite/ld-s390/tlspic_64.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-s390/tlspic_64.rd
+@@ -39,6 +39,7 @@ Program Headers:
+ +LOAD .* RW +0x1000
+ +DYNAMIC .* RW +0x8
+ +TLS .* 0x0+60 0x0+80 R +0x20
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+
+ Section to Segment mapping:
+ +Segment Sections...
+@@ -46,6 +47,7 @@ Program Headers:
+ +01 +.tdata .dynamic .got *
+ +02 +.dynamic *
+ +03 +.tdata .tbss *
++ +04 +
+
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
+ +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
+--- binutils-2.23.52.0.1/ld/testsuite/ld-sh/tlsbin-2.d
++++ binutils-2.23.52.0.1/ld/testsuite/ld-sh/tlsbin-2.d
+@@ -44,6 +44,7 @@ Program Headers:
+ +LOAD.*
+ +DYNAMIC.*
+ +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+18 0x0+28 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+
+ Section to Segment mapping:
+ +Segment Sections\.\.\.
+@@ -53,6 +54,7 @@ Program Headers:
+ +03 +\.tdata \.dynamic \.got *
+ +04 +\.dynamic *
+ +05 +\.tdata \.tbss *
++ +06 +
+
+ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
+ Offset +Info +Type +Sym\.Value +Sym\. Name \+ Addend
+--- binutils-2.23.52.0.1/ld/testsuite/ld-sh/tlspic-2.d
++++ binutils-2.23.52.0.1/ld/testsuite/ld-sh/tlspic-2.d
+@@ -32,7 +32,7 @@ Key to Flags:
+
+ Elf file type is DYN \(Shared object file\)
+ Entry point 0x[0-9a-f]+
+-There are 4 program headers, starting at offset [0-9]+
++There are [0-9] program headers, starting at offset [0-9]+
+
+ Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+@@ -40,6 +40,7 @@ Program Headers:
+ +LOAD.*
+ +DYNAMIC.*
+ +TLS .* 0x0+18 0x0+20 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+
+ Section to Segment mapping:
+ +Segment Sections\.\.\.
+@@ -47,6 +48,7 @@ Program Headers:
+ +01 +\.tdata \.dynamic \.got *
+ +02 +\.dynamic *
+ +03 +\.tdata \.tbss *
++ +04 +
+
+ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 10 entries:
+ Offset +Info +Type +Sym\.Value +Sym\. Name \+ Addend
+--- binutils-2.23.52.0.1/ld/testsuite/ld-sparc/gotop32.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-sparc/gotop32.rd
+@@ -31,6 +31,7 @@ Program Headers:
+ +LOAD +0x0+ 0x0+ 0x0+ 0x0+2000 0x0+2000 R E 0x10000
+ +LOAD +0x0+2000 0x0+12000 0x0+12000 0x0+2000 0x0+2000 RW +0x10000
+ +DYNAMIC +0x0+2000 0x0+12000 0x0+12000 0x0+70 0x0+70 RW +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
+--- binutils-2.23.52.0.1/ld/testsuite/ld-sparc/gotop64.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-sparc/gotop64.rd
+@@ -31,6 +31,7 @@ Program Headers:
+ +LOAD +0x0+ 0x0+ 0x0+ 0x0+2000 0x0+2000 R E 0x100000
+ +LOAD +0x0+2000 0x0+102000 0x0+102000 0x0+2000 0x0+2000 RW +0x100000
+ +DYNAMIC +0x0+2000 0x0+102000 0x0+102000 0x0+e0 0x0+e0 RW +0x8
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
+--- binutils-2.23.52.0.1/ld/testsuite/ld-sparc/tlssunbin32.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-sparc/tlssunbin32.rd
+@@ -30,13 +30,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
+
+ Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz +Flg Align
+- +PHDR +0x0+34 0x0+10034 0x0+10034 0x0+c0 0x0+c0 R E 0x4
+- +INTERP +0x0+f4 0x0+100f4 0x0+100f4 0x0+11 0x0+11 R +0x1
++ +PHDR +0x0+34 0x0+10034 0x0+10034 (0x[0-9a-f]+) \1 R E 0x4
++ +INTERP +(0x[0-9a-f]+ ){3}0x0+11 0x0+11 R +0x1
+ .*Requesting program interpreter.*
+ +LOAD .* R E 0x10000
+ +LOAD .* RW +0x10000
+ +DYNAMIC .* RW +0x4
+ +TLS .* 0x0+1060 0x0+10a0 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
+--- binutils-2.23.52.0.1/ld/testsuite/ld-sparc/tlssunbin64.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-sparc/tlssunbin64.rd
+@@ -30,13 +30,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
+
+ Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+- +PHDR +0x0+40 0x0+100040 0x0+100040 0x0+150 0x0+150 R E 0x8
+- +INTERP +0x0+190 0x0+100190 0x0+100190 0x0+19 0x0+19 R +0x1
++ +PHDR +0x0+40 0x0+100040 0x0+100040 (0x[0-9a-f]+) \1 R E 0x8
++ +INTERP +0x0+([0-9a-f]+) (0x0+10+\1) \2 0x0+19 0x0+19 R +0x1
+ .*Requesting program interpreter.*
+ +LOAD .* R E 0x100000
+ +LOAD .* RW +0x100000
+ +DYNAMIC .* RW +0x8
+ +TLS .* 0x0+60 0x0+a0 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
+--- binutils-2.23.52.0.1/ld/testsuite/ld-sparc/tlssunnopic32.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-sparc/tlssunnopic32.rd
+@@ -32,6 +32,7 @@ Program Headers:
+ +LOAD .* RW +0x10000
+ +DYNAMIC .* RW +0x4
+ +TLS .* 0x0+ 0x0+24 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 12 entries:
+--- binutils-2.23.52.0.1/ld/testsuite/ld-sparc/tlssunnopic64.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-sparc/tlssunnopic64.rd
+@@ -32,6 +32,7 @@ Program Headers:
+ +LOAD .* RW +0x100000
+ +DYNAMIC .* RW +0x8
+ +TLS .* 0x0+ 0x0+24 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
+--- binutils-2.23.52.0.1/ld/testsuite/ld-sparc/tlssunpic32.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-sparc/tlssunpic32.rd
+@@ -36,6 +36,7 @@ Program Headers:
+ +LOAD +0x0+2000 0x0+12000 0x0+12000 0x0+184 0x0+184 RWE 0x10000
+ +DYNAMIC +0x0+2060 0x0+12060 0x0+12060 0x0+98 0x0+98 RW +0x4
+ +TLS +0x0+2000 0x0+12000 0x0+12000 0x0+60 0x0+80 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
+--- binutils-2.23.52.0.1/ld/testsuite/ld-sparc/tlssunpic64.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-sparc/tlssunpic64.rd
+@@ -36,6 +36,7 @@ Program Headers:
+ +LOAD +0x0+2000 0x0+102000 0x0+102000 0x0+3a0 0x0+3a0 RWE 0x100000
+ +DYNAMIC +0x0+2060 0x0+102060 0x0+102060 0x0+130 0x0+130 RW +0x8
+ +TLS +0x0+2000 0x0+102000 0x0+102000 0x0+60 0x0+80 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
+--- binutils-2.23.52.0.1/ld/testsuite/ld-x86-64/tlsgdesc.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-x86-64/tlsgdesc.rd
+@@ -36,12 +36,14 @@ Program Headers:
+ +LOAD.*
+ +LOAD.*
+ +DYNAMIC.*
++ +PAX_FLAGS.*
+
+ Section to Segment mapping:
+ +Segment Sections...
+ +00 +.hash .dynsym .dynstr .rela.dyn .rela.plt .plt .text *
+ +01 +.dynamic .got .got.plt *
+ +02 +.dynamic *
++ +03 +
+
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 8 entries:
+ +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
+--- binutils-2.23.52.0.1/ld/testsuite/ld-x86-64/tlspic.rd
++++ binutils-2.23.52.0.1/ld/testsuite/ld-x86-64/tlspic.rd
+@@ -40,6 +40,7 @@ Program Headers:
+ +LOAD +0x0+11ac 0x0+2011ac 0x0+2011ac 0x0+244 0x0+244 RW +0x200000
+ +DYNAMIC +0x0+1210 0x0+201210 0x0+201210 0x0+130 0x0+130 RW +0x8
+ +TLS +0x0+11ac 0x0+2011ac 0x0+2011ac 0x0+60 0x0+80 R +0x1
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+
+ Section to Segment mapping:
+ +Segment Sections...
+@@ -47,6 +48,7 @@ Program Headers:
+ +01 +.tdata .dynamic .got .got.plt *
+ +02 +.dynamic *
+ +03 +.tdata .tbss *
++ +04 +
+
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
+ +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
hooks/post-receive
--
IPFire 3.x development tree