diff options
author | Alan Modra <amodra@gmail.com> | 2002-10-17 02:59:15 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-10-17 02:59:15 +0000 |
commit | acf8aed4a6c9a9d255327c1df615a00b956ac780 (patch) | |
tree | ebd43de8d858fbc73c4a0e19b3330bb793cd2718 /bfd/elf32-m32r.c | |
parent | 311797d555eeab4140274c38ac3905ed4c543417 (diff) | |
download | gdb-acf8aed4a6c9a9d255327c1df615a00b956ac780.zip gdb-acf8aed4a6c9a9d255327c1df615a00b956ac780.tar.gz gdb-acf8aed4a6c9a9d255327c1df615a00b956ac780.tar.bz2 |
* elfxx-target.h (USE_REL): Don't define as 1.
* elf32-arm.h (USE_REL): Provide a default define of 0.
Use #if rather than #ifdef when testing USE_REL.
* elf32-m32r.c: Likewise.
* elf32-arc.c (USE_REL): Define as 1.
* elf32-d10v.c (USE_REL): Likewise.
* elf32-m32r.c (USE_REL): Likewise.
* elf32-m68hc11.c (USE_REL): Likewise.
* elf32-m68hc12.c (USE_REL): Likewise.
* elf32-or32.c (USE_REL): Likewise.
* elfarm-nabi.c (USE_REL): Likewise.
Diffstat (limited to 'bfd/elf32-m32r.c')
-rw-r--r-- | bfd/elf32-m32r.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c index 8adb1e2..7a7d500 100644 --- a/bfd/elf32-m32r.c +++ b/bfd/elf32-m32r.c @@ -88,7 +88,11 @@ asection * m32r_elf_gc_mark_hook This only saves space in libraries and object files, but perhaps relocs will be put in ROM? All in all though, REL relocs are a pain to work with. */ -#define USE_REL +#define USE_REL 1 + +#ifndef USE_REL +#define USE_REL 0 +#endif static reloc_howto_type m32r_elf_howto_table[] = { @@ -982,7 +986,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, /* Assume success. */ boolean ret = true; -#ifndef USE_REL +#if !USE_REL if (info->relocateable) return true; #endif @@ -1026,7 +1030,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, howto = m32r_elf_howto_table + r_type; r_symndx = ELF32_R_SYM (rel->r_info); -#ifdef USE_REL +#if USE_REL if (info->relocateable) { /* This is a relocateable link. We don't have to change @@ -1102,7 +1106,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, sym = local_syms + r_symndx; sec = local_sections[r_symndx]; sym_name = "<local symbol>"; -#ifndef USE_REL +#if !USE_REL relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); addend = rel->r_addend; #else @@ -1507,7 +1511,7 @@ m32r_elf_relax_section (abfd, sec, link_info, again) will be at least 4 bytes closer if we can relax. It'll actually be 4 or 8 bytes closer, but we don't know which just yet and the difference isn't significant enough to worry about. */ -#ifndef USE_REL /* put in for learning purposes */ +#if !USE_REL /* put in for learning purposes */ pcrel_value += irel->r_addend; #else addend = bfd_get_signed_16 (abfd, contents + irel->r_offset + 2); @@ -1536,7 +1540,7 @@ m32r_elf_relax_section (abfd, sec, link_info, again) We OR in CODE just in case it's not a nop (technically, CODE currently must be a nop, but for cleanness we allow it to be anything). */ -#ifndef USE_REL /* put in for learning purposes */ +#if !USE_REL /* put in for learning purposes */ code = 0x7e000000 | MAKE_PARALLEL (code); #else code = (0x7e000000 + (((addend >> 2) & 0xff) << 16)) | MAKE_PARALLEL (code); @@ -1546,7 +1550,7 @@ m32r_elf_relax_section (abfd, sec, link_info, again) else { /* Change the seth rN,foo to a bl24 foo. */ -#ifndef USE_REL /* put in for learning purposes */ +#if !USE_REL /* put in for learning purposes */ code = 0xfe000000; #else code = 0xfe000000 + ((addend >> 2) & 0xffffff); @@ -2107,7 +2111,7 @@ m32r_elf_check_relocs (abfd, info, sec, relocs) #define elf_backend_check_relocs m32r_elf_check_relocs #define elf_backend_can_gc_sections 1 -#ifndef USE_REL +#if !USE_REL #define elf_backend_rela_normal 1 #endif #if 0 /* not yet */ |