This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] mips: Print extra elf header flags.
- From: Carlos O'Donell <carlos at codesourcery dot com>
- To: Nick Clifton <nickc at redhat dot com>, binutils at sourceware dot org
- Cc: Richard Sandiford <richard at codesourcery dot com>
- Date: Fri, 16 Feb 2007 10:14:08 -0500
- Subject: [PATCH] mips: Print extra elf header flags.
The following patch adds support for printing all extra MIPS elf
header flags.
Previous behaviour:
objdump -p foo.o
private flags = 50001007: [abi=O32] [mips32] [not 32bitmode]
With the patch:
private flags = 50001007: [abi=O32] [mips32] [not 32bitmode]\
[.noreorder] [PIC] [CPIC]
No regressions on mips-linux-gnu.
OK to apply?
Cheers,
Carlos.
--
Carlos O'Donell
CodeSourcery
carlos@codesourcery.com
(650) 331-3385 x716
bfd/
2007-02-16 Carlos O'Donell <carlos@codesourcery.com>
* elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data):
Print EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_XGOT
and EF_MIPS_UCODE.
Index: bfd/elfxx-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.c,v
retrieving revision 1.193
diff -u -p -r1.193 elfxx-mips.c
--- bfd/elfxx-mips.c 29 Jan 2007 16:29:21 -0000 1.193
+++ bfd/elfxx-mips.c 16 Feb 2007 14:54:33 -0000
@@ -11223,6 +11223,21 @@ _bfd_mips_elf_print_private_bfd_data (bf
else
fprintf (file, _(" [not 32bitmode]"));
+ if (elf_elfheader (abfd)->e_flags & EF_MIPS_NOREORDER)
+ fprintf (file, _(" [.noreorder]"));
+
+ if (elf_elfheader (abfd)->e_flags & EF_MIPS_PIC)
+ fprintf (file, _(" [PIC]"));
+
+ if (elf_elfheader (abfd)->e_flags & EF_MIPS_CPIC)
+ fprintf (file, _(" [CPIC]"));
+
+ if (elf_elfheader (abfd)->e_flags & EF_MIPS_XGOT)
+ fprintf (file, _(" [XGOT]"));
+
+ if (elf_elfheader (abfd)->e_flags & EF_MIPS_UCODE)
+ fprintf (file, _(" [UCODE]"));
+
fputc ('\n', file);
return TRUE;