aboutsummaryrefslogtreecommitdiff
path: root/bfd/pdp11.c
diff options
context:
space:
mode:
authorBen Elliston <bje@au.ibm.com>2005-01-31 23:13:34 +0000
committerBen Elliston <bje@au.ibm.com>2005-01-31 23:13:34 +0000
commit0e71e4955cd1a6ad7d03775dec5df49323204dec (patch)
treee01ba923b5a2ce31612afdf6f289bb0d614719a1 /bfd/pdp11.c
parent71143983c8f9437ad5bd813f1355305c6ab52ffd (diff)
downloadgdb-0e71e4955cd1a6ad7d03775dec5df49323204dec.zip
gdb-0e71e4955cd1a6ad7d03775dec5df49323204dec.tar.gz
gdb-0e71e4955cd1a6ad7d03775dec5df49323204dec.tar.bz2
* aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c, coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c, coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c, cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c, elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c, elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c, i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c, nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c, pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c, sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c, doc/chew.c, hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code throughout. Similarly, collapse #if 1'd code.
Diffstat (limited to 'bfd/pdp11.c')
-rw-r--r--bfd/pdp11.c97
1 files changed, 2 insertions, 95 deletions
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index f1aa421..20e9bf3 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -842,15 +842,7 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
}
#endif /* STAT_FOR_EXEC */
- if (result)
- {
-#if 0 /* These should be set correctly anyways. */
- abfd->sections = obj_textsec (abfd);
- obj_textsec (abfd)->next = obj_datasec (abfd);
- obj_datasec (abfd)->next = obj_bsssec (abfd);
-#endif
- }
- else
+ if (!result)
{
free (rawptr);
abfd->tdata.aout_data = oldrawptr;
@@ -1074,9 +1066,6 @@ adjust_o_magic (abfd, execp)
/* Data. */
if (!obj_datasec (abfd)->user_set_vma)
{
-#if 0 /* ?? Does alignment in the file image really matter? */
- pad = align_power (vma, obj_datasec (abfd)->alignment_power) - vma;
-#endif
obj_textsec (abfd)->size += pad;
pos += pad;
vma += pad;
@@ -1091,9 +1080,6 @@ adjust_o_magic (abfd, execp)
/* BSS. */
if (! obj_bsssec (abfd)->user_set_vma)
{
-#if 0
- pad = align_power (vma, obj_bsssec (abfd)->alignment_power) - vma;
-#endif
obj_datasec (abfd)->size += pad;
pos += pad;
vma += pad;
@@ -1708,41 +1694,6 @@ translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer)
else if ((cache_ptr->flags & BSF_GLOBAL) != 0)
sym_pointer->e_type[0] |= N_EXT;
-#if 0
- if ((cache_ptr->flags & BSF_CONSTRUCTOR) != 0)
- {
- int type = ((aout_symbol_type *) cache_ptr)->type;
-
-
- switch (type)
- {
- case N_ABS: type = N_SETA; break;
- case N_TEXT: type = N_SETT; break;
- case N_DATA: type = N_SETD; break;
- case N_BSS: type = N_SETB; break;
- }
- sym_pointer->e_type[0] = type;
- }
-#endif
-
-#if 0
- if ((cache_ptr->flags & BSF_WEAK) != 0)
- {
- int type;
-
- switch (sym_pointer->e_type[0] & N_TYPE)
- {
- default:
- case N_ABS: type = N_WEAKA; break;
- case N_TEXT: type = N_WEAKT; break;
- case N_DATA: type = N_WEAKD; break;
- case N_BSS: type = N_WEAKB; break;
- case N_UNDF: type = N_WEAKU; break;
- }
- sym_pointer->e_type[0] = type;
- }
-#endif
-
PUT_WORD(abfd, value, sym_pointer->e_value);
return TRUE;
@@ -2063,30 +2014,6 @@ pdp11_aout_swap_reloc_out (abfd, g, natptr)
else
r_index = (*(g->sym_ptr_ptr))->KEEPIT;
-#if 0
- if (bfd_is_abs_section (bfd_get_section (sym)))
- {
- r_extern = 0;
- r_index = N_ABS;
- r_type = RABS;
- }
- else if ((sym->flags & BSF_SECTION_SYM) == 0)
- {
- if (bfd_is_und_section (bfd_get_section (sym))
- || (sym->flags & BSF_GLOBAL) != 0)
- r_extern = 1;
- else
- r_extern = 0;
- r_index = (*(g->sym_ptr_ptr))->KEEPIT;
- }
- else
- {
- /* Just an ordinary section */
- r_extern = 0;
- r_index = output_section->target_index;
- }
-#endif
-
reloc_entry = r_index << 4 | r_type | r_pcrel;
PUT_WORD (abfd, reloc_entry, natptr);
@@ -2297,14 +2224,6 @@ NAME(aout,squirt_out_relocs) (abfd, section)
unsigned int count = section->reloc_count;
bfd_size_type natsize;
-#if 0
- /* If we're writing an .o file, we must write
- relocation information, even if there is none. */
- if ((count == 0 || section->orelocation == NULL) &&
- <writing_executable>)
- return TRUE;
-#endif
-
natsize = section->size;
native = (unsigned char *) bfd_zalloc (abfd, natsize);
if (!native)
@@ -3185,12 +3104,6 @@ aout_link_add_symbols (abfd, info)
type = H_GET_8 (abfd, p->e_type);
-#if 0 /* not supported in PDP-11 a.out */
- /* Ignore debugging symbols. */
- if ((type & N_STAB) != 0)
- continue;
-#endif
-
name = strings + GET_WORD (abfd, p->e_strx);
value = GET_WORD (abfd, p->e_value);
flags = BSF_GLOBAL;
@@ -4661,13 +4574,7 @@ pdp11_aout_link_input_section (finfo, input_bfd, input_section, relocs,
}
/* Change the address of the relocation. */
-#if 0
- PUT_WORD (output_bfd,
- r_addr + input_section->output_offset,
- rel->r_address);
-#else
-fprintf (stderr, "TODO: change the address of the relocation\n");
-#endif
+ fprintf (stderr, "TODO: change the address of the relocation\n");
/* Adjust a PC relative relocation by removing the reference
to the original address in the section and including the