* arm-dis.c (print_insn_coprocessor): Check that a user specified
        ARM architecture supports the matched instruction.
        (print_insn_arm): Likewise.
        (select_arm_features): New function.  Fills in the fields of an
        arm_feature_set structure based on a given arm machine number.
        (print_insn): Initialise an arm_feature_set structure.

        * objdump.c (disassemble_bytes): Set the
        USER_SPECIFIED_MACHINE_TYPE flag in the disassemble_info structure
        if the user has invoked the -m switch.
        * doc/binutils.texi: Document the additional behaviour of
        objdump's -m switch for ARM targets.

        * dis-asm.h (USER_SPECIFIED_MACHINE_TYPE): New value for the flags
        field of struct disassemble_info.

        * gas/arm/align.s: Add labels so that COFF based targets can
        correctly locate THUMB code.
        * gas/arm/copro.d: Do not pass --architecture switch to objdump.
This commit is contained in:
Nick Clifton 2009-06-18 10:31:21 +00:00
parent 470c710ef0
commit 0313a2b8d2
10 changed files with 556 additions and 422 deletions

View file

@ -1,8 +1,18 @@
2009-06-18 Nick Clifton <nickc@redhat.com>
PR 10288
* objdump.c (disassemble_bytes): Set the
USER_SPECIFIED_MACHINE_TYPE flag in the disassemble_info structure
if the user has invoked the -m switch.
* doc/binutils.texi: Document the additional behaviour of
objdump's -m switch for ARM targets.
2009-06-18 Dave Korn <dave.korn.cygwin@gmail.com> 2009-06-18 Dave Korn <dave.korn.cygwin@gmail.com>
Merge cegcc and mingw32ce target name changes from CeGCC project. * configure.in: Merge cegcc and mingw32ce target name changes from
CeGCC project.
2007-12-25 Pedro Alves <pedro_alves@portugalmail.pt> 2007-12-25 Pedro Alves <pedro_alves@portugalmail.pt>
* configure.in: Add arm*-*-cegcc* and arm*-*-mingw32ce* targets. * configure.in: Add arm*-*-cegcc* and arm*-*-mingw32ce* targets.
* configure: Regenerate. * configure: Regenerate.

View file

@ -1801,6 +1801,10 @@ expected to contain instructions.
Like @option{-d}, but disassemble the contents of all sections, not just Like @option{-d}, but disassemble the contents of all sections, not just
those expected to contain instructions. those expected to contain instructions.
If the target is an ARM architecture this switch also has the effect
of forcing the disassembler to decode pieces of data found in code
sections as if they were instructions.
@item --prefix-addresses @item --prefix-addresses
When disassembling, print the complete address on each line. This is When disassembling, print the complete address on each line. This is
the older disassembly format. the older disassembly format.
@ -1884,6 +1888,13 @@ can be useful when disassembling object files which do not describe
architecture information, such as S-records. You can list the available architecture information, such as S-records. You can list the available
architectures with the @option{-i} option. architectures with the @option{-i} option.
If the target is an ARM architecture then this switch has an
additional effect. It restricts the disassembly to only those
instructions supported by the architecture specified by @var{machine}.
If it is necessary to use this switch because the input file does not
contain any architecture information, but it is also desired to
disassemble all the instructions use @option{-marm}.
@item -M @var{options} @item -M @var{options}
@itemx --disassembler-options=@var{options} @itemx --disassembler-options=@var{options}
Pass target specific information to the disassembler. Only supported on Pass target specific information to the disassembler. Only supported on

View file

@ -1526,6 +1526,8 @@ disassemble_bytes (struct disassemble_info * info,
info->bytes_per_line = 0; info->bytes_per_line = 0;
info->bytes_per_chunk = 0; info->bytes_per_chunk = 0;
info->flags = disassemble_all ? DISASSEMBLE_DATA : 0; info->flags = disassemble_all ? DISASSEMBLE_DATA : 0;
if (machine)
info->flags |= USER_SPECIFIED_MACHINE_TYPE;
if (info->disassembler_needs_relocs if (info->disassembler_needs_relocs
&& (bfd_get_file_flags (aux->abfd) & EXEC_P) == 0 && (bfd_get_file_flags (aux->abfd) & EXEC_P) == 0

View file

@ -1,3 +1,10 @@
2009-06-18 Nick Clifton <nickc@redhat.com>
PR 10288
* gas/arm/align.s: Add labels so that COFF based targets can
correctly locate THUMB code.
* gas/arm/copro.d: Do not pass --architecture switch to objdump.
2009-06-15 Nick Clifton <nickc@redhat.com> 2009-06-15 Nick Clifton <nickc@redhat.com>
PR gas/10186 PR gas/10186

View file

@ -1,5 +1,7 @@
.syntax unified .syntax unified
.thumb .thumb
.global foo
foo:
nop nop
mov r1,r2 mov r1,r2
.p2align 4 .p2align 4
@ -7,6 +9,8 @@
.p2align 3 .p2align 3
.arm .arm
.global bar
bar:
nop nop
mov r1,r2 mov r1,r2
.p2align 4 .p2align 4

View file

@ -1,4 +1,4 @@
#objdump: -dr --prefix-addresses --show-raw-insn --architecture=armv5te #objdump: -dr --prefix-addresses --show-raw-insn
#name: ARM CoProcessor Instructions #name: ARM CoProcessor Instructions
#as: -march=armv5te -EL #as: -march=armv5te -EL

View file

@ -1,11 +1,16 @@
2009-06-18 Nick Clifton <nickc@redhat.com>
* dis-asm.h (USER_SPECIFIED_MACHINE_TYPE): New value for the flags
field of struct disassemble_info.
2009-06-09 Ian Lance Taylor <ian@airs.com> 2009-06-09 Ian Lance Taylor <ian@airs.com>
* ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Define for C++. * ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Define for C++.
2009-06-15 Nick Clifton <nickc@redhat.com> 2009-06-15 Nick Clifton <nickc@redhat.com>
* dis-asm.h (struct disassemble_info): New value for the flags * dis-asm.h (DISASSEMBLE_DATA): New value for the flags field of
field. struct disassemble_info.
2009-06-02 Ian Lance Taylor <iant@google.com> 2009-06-02 Ian Lance Taylor <iant@google.com>

View file

@ -113,6 +113,9 @@ typedef struct disassemble_info
#define INSN_HAS_RELOC (1 << 31) #define INSN_HAS_RELOC (1 << 31)
/* Set if the user has requested the disassembly of data as well as code. */ /* Set if the user has requested the disassembly of data as well as code. */
#define DISASSEMBLE_DATA (1 << 30) #define DISASSEMBLE_DATA (1 << 30)
/* Set if the user has specifically set the machine type encoded in the
mach field of this structure. */
#define USER_SPECIFIED_MACHINE_TYPE (1 << 29)
/* Use internally by the target specific disassembly code. */ /* Use internally by the target specific disassembly code. */
void *private_data; void *private_data;

View file

@ -1,3 +1,13 @@
2009-06-18 Nick Clifton <nickc@redhat.com>
PR 10288
* arm-dis.c (print_insn_coprocessor): Check that a user specified
ARM architecture supports the matched instruction.
(print_insn_arm): Likewise.
(select_arm_features): New function. Fills in the fields of an
arm_feature_set structure based on a given arm machine number.
(print_insn): Initialise an arm_feature_set structure.
2009-06-16 Maciej W. Rozycki <macro@linux-mips.org> 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
* vax-dis.c (is_function_entry): Return success for synthetic * vax-dis.c (is_function_entry): Return success for synthetic

File diff suppressed because it is too large Load diff