aout-arm.c (89857) | aout-arm.c (130561) |
---|---|
1/* BFD back-end for raw ARM a.out binaries. | 1/* BFD back-end for raw ARM a.out binaries. |
2 Copyright 1994, 1995, 1997, 1998, 1999, 2000, 2001 | 2 Copyright 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002 |
3 Free Software Foundation, Inc. 4 Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) 5 6This file is part of BFD, the Binary File Descriptor library. 7 8This program is free software; you can redistribute it and/or modify 9it under the terms of the GNU General Public License as published by 10the Free Software Foundation; either version 2 of the License, or --- 6 unchanged lines hidden (view full) --- 17 18You should have received a copy of the GNU General Public License 19along with this program; if not, write to the Free Software 20Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 21 22#include "bfd.h" 23#include "sysdep.h" 24 | 3 Free Software Foundation, Inc. 4 Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) 5 6This file is part of BFD, the Binary File Descriptor library. 7 8This program is free software; you can redistribute it and/or modify 9it under the terms of the GNU General Public License as published by 10the Free Software Foundation; either version 2 of the License, or --- 6 unchanged lines hidden (view full) --- 17 18You should have received a copy of the GNU General Public License 19along with this program; if not, write to the Free Software 20Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 21 22#include "bfd.h" 23#include "sysdep.h" 24 |
25/* Avoid multiple defininitions from aoutx if supporting standarad a.out | 25/* Avoid multiple definitions from aoutx if supporting standard a.out |
26 as well as our own. */ 27/* Do not "beautify" the CONCAT* macro args. Traditional C will not 28 remove whitespace added here, and thus will fail to concatenate 29 the tokens. */ 30#define NAME(x,y) CONCAT3 (aoutarm,_32_,y) 31 32#define N_TXTADDR(x) \ 33 ((N_MAGIC (x) == NMAGIC) \ --- 15 unchanged lines hidden (view full) --- 49 ((x).a_info != NMAGIC)) 50#define N_MAGIC(x) ((x).a_info & ~07200) 51 52#define MY_bfd_reloc_type_lookup aoutarm_bfd_reloc_type_lookup 53 54#include "libaout.h" 55#include "aout/aout64.h" 56 | 26 as well as our own. */ 27/* Do not "beautify" the CONCAT* macro args. Traditional C will not 28 remove whitespace added here, and thus will fail to concatenate 29 the tokens. */ 30#define NAME(x,y) CONCAT3 (aoutarm,_32_,y) 31 32#define N_TXTADDR(x) \ 33 ((N_MAGIC (x) == NMAGIC) \ --- 15 unchanged lines hidden (view full) --- 49 ((x).a_info != NMAGIC)) 50#define N_MAGIC(x) ((x).a_info & ~07200) 51 52#define MY_bfd_reloc_type_lookup aoutarm_bfd_reloc_type_lookup 53 54#include "libaout.h" 55#include "aout/aout64.h" 56 |
57static boolean MY(write_object_contents) | 57static bfd_boolean MY(write_object_contents) |
58 PARAMS ((bfd *)); 59static bfd_reloc_status_type MY(fix_pcrel_26_done) 60 PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); 61static bfd_reloc_status_type MY(fix_pcrel_26) 62 PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); 63static void MY(swap_std_reloc_in) 64 PARAMS ((bfd *, struct reloc_std_external *, arelent *, asymbol **, 65 bfd_size_type)); --- 9 unchanged lines hidden (view full) --- 75 bfd_vma)); 76void MY(swap_std_reloc_out) 77 PARAMS ((bfd *, arelent *, struct reloc_std_external *)); 78 79reloc_howto_type MY(howto_table)[] = 80 { 81 /* Type rs size bsz pcrel bitpos ovrf sf name part_inpl 82 readmask setmask pcdone. */ | 58 PARAMS ((bfd *)); 59static bfd_reloc_status_type MY(fix_pcrel_26_done) 60 PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); 61static bfd_reloc_status_type MY(fix_pcrel_26) 62 PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); 63static void MY(swap_std_reloc_in) 64 PARAMS ((bfd *, struct reloc_std_external *, arelent *, asymbol **, 65 bfd_size_type)); --- 9 unchanged lines hidden (view full) --- 75 bfd_vma)); 76void MY(swap_std_reloc_out) 77 PARAMS ((bfd *, arelent *, struct reloc_std_external *)); 78 79reloc_howto_type MY(howto_table)[] = 80 { 81 /* Type rs size bsz pcrel bitpos ovrf sf name part_inpl 82 readmask setmask pcdone. */ |
83 HOWTO (0, 0, 0, 8, false, 0, complain_overflow_bitfield, 0, "8", true, 84 0x000000ff, 0x000000ff, false), 85 HOWTO (1, 0, 1, 16, false, 0, complain_overflow_bitfield, 0, "16", true, 86 0x0000ffff, 0x0000ffff, false), 87 HOWTO (2, 0, 2, 32, false, 0, complain_overflow_bitfield, 0, "32", true, 88 0xffffffff, 0xffffffff, false), 89 HOWTO (3, 2, 2, 26, true, 0, complain_overflow_signed, MY(fix_pcrel_26), 90 "ARM26", true, 0x00ffffff, 0x00ffffff, true), 91 HOWTO (4, 0, 0, 8, true, 0, complain_overflow_signed, 0, "DISP8", true, 92 0x000000ff, 0x000000ff, true), 93 HOWTO (5, 0, 1, 16, true, 0, complain_overflow_signed, 0, "DISP16", true, 94 0x0000ffff, 0x0000ffff, true), 95 HOWTO (6, 0, 2, 32, true, 0, complain_overflow_signed, 0, "DISP32", true, 96 0xffffffff, 0xffffffff, true), 97 HOWTO (7, 2, 2, 26, false, 0, complain_overflow_signed, 98 MY(fix_pcrel_26_done), "ARM26D", true, 0x0, 0x0, 99 false), | 83 HOWTO (0, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, "8", TRUE, 84 0x000000ff, 0x000000ff, FALSE), 85 HOWTO (1, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, 0, "16", TRUE, 86 0x0000ffff, 0x0000ffff, FALSE), 87 HOWTO (2, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "32", TRUE, 88 0xffffffff, 0xffffffff, FALSE), 89 HOWTO (3, 2, 2, 26, TRUE, 0, complain_overflow_signed, MY(fix_pcrel_26), 90 "ARM26", TRUE, 0x00ffffff, 0x00ffffff, TRUE), 91 HOWTO (4, 0, 0, 8, TRUE, 0, complain_overflow_signed, 0, "DISP8", TRUE, 92 0x000000ff, 0x000000ff, TRUE), 93 HOWTO (5, 0, 1, 16, TRUE, 0, complain_overflow_signed, 0, "DISP16", TRUE, 94 0x0000ffff, 0x0000ffff, TRUE), 95 HOWTO (6, 0, 2, 32, TRUE, 0, complain_overflow_signed, 0, "DISP32", TRUE, 96 0xffffffff, 0xffffffff, TRUE), 97 HOWTO (7, 2, 2, 26, FALSE, 0, complain_overflow_signed, 98 MY(fix_pcrel_26_done), "ARM26D", TRUE, 0x0, 0x0, 99 FALSE), |
100 EMPTY_HOWTO (-1), | 100 EMPTY_HOWTO (-1), |
101 HOWTO (9, 0, -1, 16, false, 0, complain_overflow_bitfield, 0, "NEG16", true, 102 0x0000ffff, 0x0000ffff, false), 103 HOWTO (10, 0, -2, 32, false, 0, complain_overflow_bitfield, 0, "NEG32", true, 104 0xffffffff, 0xffffffff, false) | 101 HOWTO (9, 0, -1, 16, FALSE, 0, complain_overflow_bitfield, 0, "NEG16", TRUE, 102 0x0000ffff, 0x0000ffff, FALSE), 103 HOWTO (10, 0, -2, 32, FALSE, 0, complain_overflow_bitfield, 0, "NEG32", TRUE, 104 0xffffffff, 0xffffffff, FALSE) |
105 }; 106 107#define RELOC_ARM_BITS_NEG_BIG ((unsigned int) 0x08) 108#define RELOC_ARM_BITS_NEG_LITTLE ((unsigned int) 0x10) 109 110reloc_howto_type * 111MY(reloc_howto) (abfd, rel, r_index, r_extern, r_pcrel) 112 bfd *abfd; --- 453 unchanged lines hidden --- | 105 }; 106 107#define RELOC_ARM_BITS_NEG_BIG ((unsigned int) 0x08) 108#define RELOC_ARM_BITS_NEG_LITTLE ((unsigned int) 0x10) 109 110reloc_howto_type * 111MY(reloc_howto) (abfd, rel, r_index, r_extern, r_pcrel) 112 bfd *abfd; --- 453 unchanged lines hidden --- |