aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog11
-rw-r--r--binutils/doc/binutils.texi5
-rw-r--r--binutils/objdump.c16
-rw-r--r--binutils/readelf.c8
4 files changed, 39 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 24e2afe..2d23f20 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,14 @@
+2016-01-20 Mickael Guene <mickael.guene@st.com>
+
+ * readelf.c (get_elf_section_flags): Display y letter for section
+ with SHF_ARM_NOREAD section flag in readelf section output.
+ (process_section_headers): Add y letter in readelf section output
+ key mapping for ARM architecture.
+ * objdump.c (dump_section_header): Display NOREAD attributes as
+ well.
+ * doc/binutils.texi (objdump): Note that it is correct for
+ sections to have both the READONLY and NOREAD attributes.
+
2016-01-19 John Baldwin <jhb@FreeBSD.org>
* readelf.c (get_freebsd_elfcore_note_type): Remove unused variable.
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
index 771100e..b173732 100644
--- a/binutils/doc/binutils.texi
+++ b/binutils/doc/binutils.texi
@@ -2125,6 +2125,11 @@ although @command{ld} relocates the sections correctly, using @samp{objdump
Instead, it shows the usual addresses, which are implicit for the
target.
+Note, in some cases it is possible for a section to have both the
+READONLY and the NOREAD attributes set. In such cases the NOREAD
+attribute takes precedence, but @command{objdump} will report both
+since the exact setting of the flag bits might be important.
+
@item -H
@itemx --help
Print a summary of the options to @command{objdump} and exit.
diff --git a/binutils/objdump.c b/binutils/objdump.c
index fa991a9..3c94a76 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -488,9 +488,23 @@ dump_section_header (bfd *abfd, asection *section,
}
PF (SEC_SMALL_DATA, "SMALL_DATA");
if (bfd_get_flavour (abfd) == bfd_target_coff_flavour)
- PF (SEC_COFF_SHARED, "SHARED");
+ {
+ PF (SEC_COFF_SHARED, "SHARED");
+ PF (SEC_COFF_NOREAD, "NOREAD");
+ }
+ else if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
+ {
+ /* Note - sections can have both the READONLY and NOREAD attributes
+ set. In this case the NOREAD takes precedence, but we report both
+ since the user may need to know that both bits are set. */
+ PF (SEC_ELF_NOREAD, "NOREAD");
+ }
PF (SEC_THREAD_LOCAL, "THREAD_LOCAL");
PF (SEC_GROUP, "GROUP");
+ if (bfd_get_arch (abfd) == bfd_arch_mep)
+ {
+ PF (SEC_MEP_VLIW, "VLIW");
+ }
if ((section->flags & SEC_LINK_ONCE) != 0)
{
diff --git a/binutils/readelf.c b/binutils/readelf.c
index b4aaf51..b3a28a8 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -5430,6 +5430,9 @@ get_elf_section_flags (bfd_vma sh_flags)
|| elf_header.e_machine == EM_K1OM)
&& flag == SHF_X86_64_LARGE)
*p = 'l';
+ else if (elf_header.e_machine == EM_ARM
+ && flag == SHF_ARM_NOREAD)
+ *p = 'y';
else if (flag & SHF_MASKOS)
{
*p = 'o';
@@ -6007,6 +6010,11 @@ process_section_headers (FILE * file)
W (write), A (alloc), X (execute), M (merge), S (strings), l (large)\n\
I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)\n\
O (extra OS processing required) o (OS specific), p (processor specific)\n"));
+ else if (elf_header.e_machine == EM_ARM)
+ printf (_("Key to Flags:\n\
+ W (write), A (alloc), X (execute), M (merge), S (strings), y (noread)\n\
+ I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)\n\
+ O (extra OS processing required) o (OS specific), p (processor specific)\n"));
else
printf (_("Key to Flags:\n\
W (write), A (alloc), X (execute), M (merge), S (strings)\n\