summaryrefslogtreecommitdiff
path: root/bfd/elf32-m68hc1x.c
diff options
context:
space:
mode:
authorseank <seank>2012-08-02 20:39:32 +0000
committerseank <seank>2012-08-02 20:39:32 +0000
commit80e548845a83de34b11849f105190dd39022f054 (patch)
treef8b1f1cefba25c3c7b4d4721c549aab77a311fc4 /bfd/elf32-m68hc1x.c
parenta31cf4dbe70f62ff2324a33358dd8b95fcb5982b (diff)
downloadbinutils-redhat-80e548845a83de34b11849f105190dd39022f054.tar.gz
* elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Modified
conditional statment to allow suppression of mismatched bank warning.
Diffstat (limited to 'bfd/elf32-m68hc1x.c')
-rw-r--r--bfd/elf32-m68hc1x.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c
index 442a41121b..ef0a9f14a5 100644
--- a/bfd/elf32-m68hc1x.c
+++ b/bfd/elf32-m68hc1x.c
@@ -918,9 +918,11 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
struct m68hc11_page_info *pinfo;
const struct elf_backend_data * const ebd = get_elf_backend_data (input_bfd);
struct m68hc11_elf_link_hash_table *htab;
+ unsigned long e_flags;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
+ e_flags = elf_elfheader (input_bfd)->e_flags;
htab = m68hc11_elf_hash_table (info);
if (htab == NULL)
@@ -1048,7 +1050,7 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
a LO8XG. Does not actually check that it was a LO8XG.
Adjusts high and low bytes. */
relocation = phys_addr;
- if ((elf_elfheader (input_bfd)->e_flags & E_M68HC11_XGATE_RAMOFFSET)
+ if ((e_flags & E_M68HC11_XGATE_RAMOFFSET)
&& (relocation >= 0x2000))
relocation += 0xc000; /* HARDCODED RAM offset for XGATE. */
@@ -1162,7 +1164,7 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
if (m68hc11_addr_is_banked (pinfo, relocation + rel->r_addend)
&& m68hc11_addr_is_banked (pinfo, insn_addr)
- && phys_page != insn_page)
+ && phys_page != insn_page && !(e_flags & E_M68HC11_NO_BANK_WARNING))
{
const char * msg;
char * buf;