From 7b82c249fa95cb7c5500e8fe629f54f32de72ff8 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 20 Dec 2000 00:21:57 +0000 Subject: 2000-12-19 Kazu Hirata * sco5-core.c: Fix formatting. * section.c: Likewise. * sparclinux.c: Likewise. * sparclynx.c: Likewise. * sparcnetbsd.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * stab-syms.c: Likewise. * sunos.c: Likewise. * syms.c: Likewise. * sysdep.h: Likewise. --- bfd/ChangeLog | 14 ++++++++++++++ bfd/sco5-core.c | 54 ++++++++++++++++++++++++++--------------------------- bfd/section.c | 19 ++----------------- bfd/sparclinux.c | 8 ++++---- bfd/sparclynx.c | 6 +++--- bfd/sparcnetbsd.c | 2 +- bfd/srec.c | 13 ++++++------- bfd/stab-syms.c | 6 +++--- bfd/stabs.c | 4 ++-- bfd/sunos.c | 56 +++++++++++++++++++++++++++---------------------------- bfd/syms.c | 26 ++++++++++---------------- bfd/sysdep.h | 2 +- 12 files changed, 100 insertions(+), 110 deletions(-) (limited to 'bfd') diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b4e9f15..8a03416 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,17 @@ +2000-12-19 Kazu Hirata + + * sco5-core.c: Fix formatting. + * section.c: Likewise. + * sparclinux.c: Likewise. + * sparclynx.c: Likewise. + * sparcnetbsd.c: Likewise. + * srec.c: Likewise. + * stabs.c: Likewise. + * stab-syms.c: Likewise. + * sunos.c: Likewise. + * syms.c: Likewise. + * sysdep.h: Likewise. + 2000-12-18 Nick Clifton * coff-arm.c (EXTRA_S_FLAGS): Only define if not already diff --git a/bfd/sco5-core.c b/bfd/sco5-core.c index 46c97d2..5d5677e 100644 --- a/bfd/sco5-core.c +++ b/bfd/sco5-core.c @@ -84,7 +84,7 @@ sco5_core_make_empty_symbol (abfd) new->the_bfd = abfd; return new; } - + static struct user * read_uarea(abfd, filepos) bfd *abfd; @@ -109,7 +109,7 @@ read_uarea(abfd, filepos) } /* Sanity check perhaps??? */ - if (rawptr->u.u_dsize > 0x1000000) /* Remember, it's in pages... */ + if (rawptr->u.u_dsize > 0x1000000) /* Remember, it's in pages... */ { bfd_set_error (bfd_error_wrong_format); return NULL; @@ -154,7 +154,7 @@ sco5_core_file_p (abfd) || (bfd_read ((void *)&coffset_siz, 1, sizeof coffset_siz, abfd) != sizeof coffset_siz) ) { - bfd_set_error (bfd_error_wrong_format); + bfd_set_error (bfd_error_wrong_format); return NULL; } @@ -165,50 +165,49 @@ sco5_core_file_p (abfd) != sizeof coffsets) || ((coffsets.u_info != 1) && (coffsets.u_info != C_VERSION))) { - bfd_set_error (bfd_error_wrong_format); + bfd_set_error (bfd_error_wrong_format); return NULL; } - - if (coffsets.u_info == 1) - { + if (coffsets.u_info == 1) + { /* Old version, no section heads, read info from user struct */ u = read_uarea(abfd, coffsets.u_user); if (! u) return NULL; - if (!make_bfd_asection (abfd, ".reg", SEC_HAS_CONTENTS, + if (!make_bfd_asection (abfd, ".reg", SEC_HAS_CONTENTS, (bfd_size_type) coffsets.u_usize, 0 - (bfd_vma) u->u_ar0, (file_ptr) coffsets.u_user)) return NULL; - - if (!make_bfd_asection (abfd, ".data", + + if (!make_bfd_asection (abfd, ".data", SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS, ((bfd_size_type) u->u_exdata.ux_dsize + u->u_exdata.ux_bsize), (bfd_vma) u->u_exdata.ux_datorg, (file_ptr) coffsets.u_data)) return NULL; - - if (!make_bfd_asection (abfd, ".stack", - SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS, + + if (!make_bfd_asection (abfd, ".stack", + SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS, (bfd_size_type) u->u_ssize * NBPC, (bfd_vma) u->u_sub, (file_ptr) coffsets.u_stack)) return NULL; return abfd->xvec; /* Done for version 1 */ - } + } /* Immediately before coreoffsets region is a long with offset in core to first coresecthead (CORES_OFFSETS), the long before this is the number of section heads in the list. Read both longs and read the coresecthead and check its validity */ - - if ((bfd_seek (abfd, - coresize - coffset_siz - 2 * sizeof coffset_siz, + + if ((bfd_seek (abfd, + coresize - coffset_siz - 2 * sizeof coffset_siz, SEEK_SET) != 0) || (bfd_read ((void *)&nsecs, 1, sizeof nsecs, abfd) != sizeof nsecs) || (bfd_read ((void *)&cheadoffs, 1, sizeof cheadoffs, abfd) @@ -226,16 +225,16 @@ sco5_core_file_p (abfd) /* Now loop over all regions and map them */ nsecs--; /* We've seen CORES_OFFSETS already */ - for (; nsecs; nsecs--) + for (; nsecs; nsecs--) { if ((bfd_seek (abfd, chead.cs_hseek, SEEK_SET) != 0) || bfd_read ((void *)&chead, 1, sizeof chead, abfd) != sizeof chead) { - bfd_set_error (bfd_error_wrong_format); + bfd_set_error (bfd_error_wrong_format); return NULL; } - switch (chead.cs_stype) + switch (chead.cs_stype) { case CORES_MAGIC: /* Core header, check magic */ if (chead.cs_x.csx_magic != COREMAGIC_NUMBER) @@ -259,7 +258,7 @@ sco5_core_file_p (abfd) *u_ar0. The other is that u_ar0 is sometimes an absolute address in kernel memory, and on other systems it is an offset from the beginning of the `struct user'. - + As a practical matter, we don't know where the registers actually are, so we have to pass the whole area to GDB. We encode the value of u_ar0 by setting the .regs section @@ -267,11 +266,10 @@ sco5_core_file_p (abfd) pointed to by u_ar0 (by setting the vma of the start of the section to -u_ar0). GDB uses this info to locate the regs, using minor trickery to get around the - offset-or-absolute-addr problem. */ + offset-or-absolute-addr problem. */ chead.cs_vaddr = 0 - (bfd_vma) u->u_ar0; - secname = ".reg"; flags = SEC_HAS_CONTENTS; @@ -345,8 +343,8 @@ int sco5_core_file_failing_signal (ignore_abfd) bfd *ignore_abfd; { - return ((ignore_abfd->tdata.sco5_core_data->u.u_sysabort != 0) - ? ignore_abfd->tdata.sco5_core_data->u.u_sysabort + return ((ignore_abfd->tdata.sco5_core_data->u.u_sysabort != 0) + ? ignore_abfd->tdata.sco5_core_data->u.u_sysabort : -1); } @@ -371,9 +369,9 @@ sco5_core_file_matches_executable_p (core_bfd, exec_bfd) /* If somebody calls any byte-swapping routines, shoot them. */ static void -swap_abort() +swap_abort () { - abort(); /* This way doesn't require any declaration for ANSI to fuck up */ + abort (); /* This way doesn't require any declaration for ANSI to fuck up */ } #define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort ) #define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort ) @@ -426,6 +424,6 @@ const bfd_target sco5_core_vec = BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), NULL, - + (PTR) 0 /* backend_data */ }; diff --git a/bfd/section.c b/bfd/section.c index 13e259e..13e10d3 100644 --- a/bfd/section.c +++ b/bfd/section.c @@ -111,7 +111,6 @@ SUBSECTION | size 0x103 | | output_section --------| - SUBSECTION Link orders @@ -133,7 +132,6 @@ SUBSECTION */ - #include "bfd.h" #include "sysdep.h" #include "libbfd.h" @@ -642,7 +640,6 @@ bfd_get_section_by_name (abfd, name) return NULL; } - /* FUNCTION bfd_get_unique_section_name @@ -693,7 +690,6 @@ bfd_get_unique_section_name (abfd, templat, count) return sname; } - /* FUNCTION bfd_make_section_old_way @@ -719,7 +715,6 @@ DESCRIPTION */ - asection * bfd_make_section_old_way (abfd, name) bfd *abfd; @@ -867,7 +862,6 @@ bfd_make_section (abfd, name) return bfd_make_section_anyway (abfd, name); } - /* FUNCTION bfd_set_section_flags @@ -911,14 +905,13 @@ bfd_set_section_flags (abfd, section, flags) return true; } - /* FUNCTION bfd_map_over_sections SYNOPSIS void bfd_map_over_sections(bfd *abfd, - void (*func)(bfd *abfd, + void (*func) (bfd *abfd, asection *sect, PTR obj), PTR obj); @@ -937,7 +930,6 @@ DESCRIPTION | for (p = abfd->sections; p != NULL; p = p->next) | func(abfd, p, ...) - */ /*VARARGS2*/ @@ -957,7 +949,6 @@ bfd_map_over_sections (abfd, operation, user_storage) abort (); } - /* FUNCTION bfd_set_section_size @@ -982,7 +973,7 @@ bfd_set_section_size (abfd, ptr, val) bfd_size_type val; { /* Once you've started writing to any section you cannot create or change - the size of any others. */ + the size of any others. */ if (abfd->output_has_begun) { @@ -1008,15 +999,12 @@ SYNOPSIS file_ptr offset, bfd_size_type count); - DESCRIPTION Sets the contents of the section @var{section} in BFD @var{abfd} to the data starting in memory at @var{data}. The data is written to the output section starting at offset @var{offset} for @var{count} octets. - - Normally <> is returned, else <>. Possible error returns are: o <> - @@ -1027,7 +1015,6 @@ DESCRIPTION This routine is front end to the back end function <<_bfd_set_section_contents>>. - */ #define bfd_get_section_size_now(abfd,sec) \ @@ -1117,8 +1104,6 @@ DESCRIPTION with zeroes. If no errors occur, <> is returned, else <>. - - */ boolean bfd_get_section_contents (abfd, section, location, offset, count) diff --git a/bfd/sparclinux.c b/bfd/sparclinux.c index 73a29b3..57bf6c6 100644 --- a/bfd/sparclinux.c +++ b/bfd/sparclinux.c @@ -95,7 +95,7 @@ sparclinux_write_object_contents (abfd) #define IS_GOT_SYM(name) \ (strncmp (name, GOT_REF_PREFIX, sizeof GOT_REF_PREFIX - 1) == 0) -/* See if a symbol name is a reference to the procedure linkage table. */ +/* See if a symbol name is a reference to the procedure linkage table. */ #ifndef PLT_REF_PREFIX #define PLT_REF_PREFIX "__PLT_" @@ -478,7 +478,7 @@ linux_tally_symbols (h, data) (h->root.root.root.string + sizeof PLT_REF_PREFIX - 1), false, false, true); - /* h2 does not follow indirect symbols. */ + /* h2 does not follow indirect symbols. */ h2 = linux_link_hash_lookup (linux_hash_table (info), (h->root.root.root.string + sizeof PLT_REF_PREFIX - 1), @@ -535,7 +535,7 @@ linux_tally_symbols (h, data) } /* Quick and dirty way of stripping these symbols from the - symtab. */ + symtab. */ if (bfd_is_abs_section (h->root.root.u.def.section)) h->root.written = true; } @@ -560,7 +560,7 @@ bfd_sparclinux_size_dynamic_sections (output_bfd, info) if (output_bfd->xvec != &MY(vec)) return true; - /* First find the fixups... */ + /* First find the fixups... */ linux_link_hash_traverse (linux_hash_table (info), linux_tally_symbols, (PTR) info); diff --git a/bfd/sparclynx.c b/bfd/sparclynx.c index dbfcae5..92454dc 100644 --- a/bfd/sparclynx.c +++ b/bfd/sparclynx.c @@ -46,7 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This is needed to reject a NewsOS file, e.g. in gdb/testsuite/gdb.t10/crossload.exp. I needed to add M_UNKNOWN to recognize a 68000 object, so this will - probably no longer reject a NewsOS object. . */ + probably no longer reject a NewsOS object. . */ #define MACHTYPE_OK(mtype) ((mtype) == M_UNKNOWN \ || (mtype) == M_68010 \ || (mtype) == M_68020 \ @@ -90,7 +90,7 @@ NAME(lynx,set_arch_mach) (abfd, machtype) case M_UNKNOWN: /* Some Sun3s make magic numbers without cpu types in them, so - we'll default to the 68000. */ + we'll default to the 68000. */ arch = bfd_arch_m68k; machine = bfd_mach_m68000; break; @@ -137,7 +137,7 @@ NAME(lynx,set_arch_mach) (abfd, machtype) } #define SET_ARCH_MACH(ABFD, EXEC) \ - NAME(lynx,set_arch_mach)(ABFD, N_MACHTYPE (EXEC)); \ + NAME(lynx,set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \ choose_reloc_size(ABFD); /* Determine the size of a relocation entry, based on the architecture */ diff --git a/bfd/sparcnetbsd.c b/bfd/sparcnetbsd.c index 4277bb8..c21f063 100644 --- a/bfd/sparcnetbsd.c +++ b/bfd/sparcnetbsd.c @@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define TARGET_IS_BIG_ENDIAN_P /* SPARC chips use either 4K or 8K pages, but object files always - assume 8K page alignment so they will work on either one. */ + assume 8K page alignment so they will work on either one. */ #define TARGET_PAGE_SIZE 0x2000 #define DEFAULT_ARCH bfd_arch_sparc diff --git a/bfd/srec.c b/bfd/srec.c index 521717c..5602239 100644 --- a/bfd/srec.c +++ b/bfd/srec.c @@ -24,7 +24,7 @@ SUBSECTION S-Record handling DESCRIPTION - + Ordinary S-Records cannot hold anything but addresses and data, so that's all that we implement. @@ -42,10 +42,10 @@ DESCRIPTION up and output them when it's time to close the bfd. An s record looks like: - + EXAMPLE S
- + DESCRIPTION Where o length @@ -61,7 +61,7 @@ DESCRIPTION 7) four byte address termination record 8) three byte address termination record 9) two byte address termination record - + o address is the start address of the data following, or in the case of a termination record, the start address of the image @@ -71,7 +71,6 @@ DESCRIPTION is the sum of all the raw byte data in the record, from the length upwards, modulo 256 and subtracted from 255. - SUBSECTION Symbol S-Record handling @@ -101,7 +100,7 @@ EXAMPLE DESCRIPTION We allow symbols to be anywhere in the data stream - the module names are always ignored. - + */ #include "bfd.h" @@ -882,7 +881,7 @@ srec_set_section_contents (abfd, section, location, offset, bytes_to_do) regardless of the siez of the addresses. */ if (S3Forced) tdata->type = 3; - else if ((section->lma + offset + bytes_to_do - 1) <= 0xffff) + else if ((section->lma + offset + bytes_to_do - 1) <= 0xffff) ; /* The default, S1, is OK. */ else if ((section->lma + offset + bytes_to_do - 1) <= 0xffffff && tdata->type <= 2) diff --git a/bfd/stab-syms.c b/bfd/stab-syms.c index f4fe6c8..4b0827f 100644 --- a/bfd/stab-syms.c +++ b/bfd/stab-syms.c @@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" -#define ARCH_SIZE 32 /* Value doesn't matter. */ +#define ARCH_SIZE 32 /* Value doesn't matter. */ #include "libaout.h" #include "aout/aout64.h" @@ -32,13 +32,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* These are not really stab symbols, but it is convenient to have them here for the sake of nm. For completeness, we could also add N_TEXT etc, but those - are never needed, since nm treats those specially. */ + are never needed, since nm treats those specially. */ #define EXTRA_SYMBOLS \ __define_name (N_SETA, "SETA")/* Absolute set element symbol */ \ __define_name (N_SETT, "SETT")/* Text set element symbol */ \ __define_name (N_SETD, "SETD")/* Data set element symbol */ \ __define_name (N_SETB, "SETB")/* Bss set element symbol */ \ - __define_name (N_SETV, "SETV")/* Pointer to set vector in data area. */ \ + __define_name (N_SETV, "SETV")/* Pointer to set vector in data area. */ \ __define_name (N_INDR, "INDR") \ __define_name (N_WARNING, "WARNING") diff --git a/bfd/stabs.c b/bfd/stabs.c index e9ac167..eb9ce8a 100644 --- a/bfd/stabs.c +++ b/bfd/stabs.c @@ -108,7 +108,7 @@ struct stab_section_info as the input offsets, because no stabs have been deleted from this section. Otherwise the i'th entry is the number of bytes of stabs that have been deleted prior to the i'th - stab. */ + stab. */ bfd_size_type *cumulative_skips; /* This is an array of string indices. For each stab symbol, we @@ -464,7 +464,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo) sinfo->stabstr->_cooked_size = _bfd_stringtab_size (sinfo->strings); /* Calculate the `cumulative_skips' array now that stabs have been - deleted for this section. */ + deleted for this section. */ if (skip != 0) { diff --git a/bfd/sunos.c b/bfd/sunos.c index ada6857..53372be 100644 --- a/bfd/sunos.c +++ b/bfd/sunos.c @@ -508,7 +508,7 @@ sunos_canonicalize_dynamic_reloc (abfd, storage, syms) * sizeof (arelent)))); if (info->canonical_dynrel == NULL && info->dynrel_count != 0) return -1; - + to = info->canonical_dynrel; if (obj_reloc_entry_size (abfd) == RELOC_EXT_SIZE) @@ -1421,7 +1421,7 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr, s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size); if (s->contents == NULL && s->_raw_size != 0) return false; - + /* The number of buckets is just the number of symbols divided by four. To compute the final size of the hash table, we must actually compute the hash table. Normally we need @@ -2274,16 +2274,16 @@ sunos_write_dynamic_symbol (output_bfd, info, harg) PUT_WORD (output_bfd, r_address, srel->r_address); if (bfd_header_big_endian (output_bfd)) { - srel->r_index[0] = (bfd_byte)(h->dynindx >> 16); - srel->r_index[1] = (bfd_byte)(h->dynindx >> 8); - srel->r_index[2] = (bfd_byte)(h->dynindx); + srel->r_index[0] = (bfd_byte) (h->dynindx >> 16); + srel->r_index[1] = (bfd_byte) (h->dynindx >> 8); + srel->r_index[2] = (bfd_byte) (h->dynindx); srel->r_type[0] = (RELOC_STD_BITS_EXTERN_BIG | RELOC_STD_BITS_JMPTABLE_BIG); } else { - srel->r_index[2] = (bfd_byte)(h->dynindx >> 16); - srel->r_index[1] = (bfd_byte)(h->dynindx >> 8); + srel->r_index[2] = (bfd_byte) (h->dynindx >> 16); + srel->r_index[1] = (bfd_byte) (h->dynindx >> 8); srel->r_index[0] = (bfd_byte)h->dynindx; srel->r_type[0] = (RELOC_STD_BITS_EXTERN_LITTLE | RELOC_STD_BITS_JMPTABLE_LITTLE); @@ -2297,8 +2297,8 @@ sunos_write_dynamic_symbol (output_bfd, info, harg) PUT_WORD (output_bfd, r_address, erel->r_address); if (bfd_header_big_endian (output_bfd)) { - erel->r_index[0] = (bfd_byte)(h->dynindx >> 16); - erel->r_index[1] = (bfd_byte)(h->dynindx >> 8); + erel->r_index[0] = (bfd_byte) (h->dynindx >> 16); + erel->r_index[1] = (bfd_byte) (h->dynindx >> 8); erel->r_index[2] = (bfd_byte)h->dynindx; erel->r_type[0] = (RELOC_EXT_BITS_EXTERN_BIG @@ -2306,8 +2306,8 @@ sunos_write_dynamic_symbol (output_bfd, info, harg) } else { - erel->r_index[2] = (bfd_byte)(h->dynindx >> 16); - erel->r_index[1] = (bfd_byte)(h->dynindx >> 8); + erel->r_index[2] = (bfd_byte) (h->dynindx >> 16); + erel->r_index[1] = (bfd_byte) (h->dynindx >> 8); erel->r_index[0] = (bfd_byte)h->dynindx; erel->r_type[0] = (RELOC_EXT_BITS_EXTERN_LITTLE @@ -2594,8 +2594,8 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc, srel->r_address); if (bfd_header_big_endian (dynobj)) { - srel->r_index[0] = (bfd_byte)(indx >> 16); - srel->r_index[1] = (bfd_byte)(indx >> 8); + srel->r_index[0] = (bfd_byte) (indx >> 16); + srel->r_index[1] = (bfd_byte) (indx >> 8); srel->r_index[2] = (bfd_byte)indx; if (h == NULL) srel->r_type[0] = 2 << RELOC_STD_BITS_LENGTH_SH_BIG; @@ -2608,8 +2608,8 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc, } else { - srel->r_index[2] = (bfd_byte)(indx >> 16); - srel->r_index[1] = (bfd_byte)(indx >> 8); + srel->r_index[2] = (bfd_byte) (indx >> 16); + srel->r_index[1] = (bfd_byte) (indx >> 8); srel->r_index[0] = (bfd_byte)indx; if (h == NULL) srel->r_type[0] = 2 << RELOC_STD_BITS_LENGTH_SH_LITTLE; @@ -2633,8 +2633,8 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc, erel->r_address); if (bfd_header_big_endian (dynobj)) { - erel->r_index[0] = (bfd_byte)(indx >> 16); - erel->r_index[1] = (bfd_byte)(indx >> 8); + erel->r_index[0] = (bfd_byte) (indx >> 16); + erel->r_index[1] = (bfd_byte) (indx >> 8); erel->r_index[2] = (bfd_byte)indx; if (h == NULL) erel->r_type[0] = @@ -2646,8 +2646,8 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc, } else { - erel->r_index[2] = (bfd_byte)(indx >> 16); - erel->r_index[1] = (bfd_byte)(indx >> 8); + erel->r_index[2] = (bfd_byte) (indx >> 16); + erel->r_index[1] = (bfd_byte) (indx >> 8); erel->r_index[0] = (bfd_byte)indx; if (h == NULL) erel->r_type[0] = @@ -2726,14 +2726,14 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc, srel->r_address); if (bfd_header_big_endian (dynobj)) { - srel->r_index[0] = (bfd_byte)(indx >> 16); - srel->r_index[1] = (bfd_byte)(indx >> 8); + srel->r_index[0] = (bfd_byte) (indx >> 16); + srel->r_index[1] = (bfd_byte) (indx >> 8); srel->r_index[2] = (bfd_byte)indx; } else { - srel->r_index[2] = (bfd_byte)(indx >> 16); - srel->r_index[1] = (bfd_byte)(indx >> 8); + srel->r_index[2] = (bfd_byte) (indx >> 16); + srel->r_index[1] = (bfd_byte) (indx >> 8); srel->r_index[0] = (bfd_byte)indx; } /* FIXME: We may have to change the addend for a PC relative @@ -2751,14 +2751,14 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc, erel->r_address); if (bfd_header_big_endian (dynobj)) { - erel->r_index[0] = (bfd_byte)(indx >> 16); - erel->r_index[1] = (bfd_byte)(indx >> 8); + erel->r_index[0] = (bfd_byte) (indx >> 16); + erel->r_index[1] = (bfd_byte) (indx >> 8); erel->r_index[2] = (bfd_byte)indx; } else { - erel->r_index[2] = (bfd_byte)(indx >> 16); - erel->r_index[1] = (bfd_byte)(indx >> 8); + erel->r_index[2] = (bfd_byte) (indx >> 16); + erel->r_index[1] = (bfd_byte) (indx >> 8); erel->r_index[0] = (bfd_byte)indx; } if (pcrel && h != NULL) @@ -2933,7 +2933,7 @@ sunos_finish_dynamic_link (abfd, info) PUT_WORD (dynobj, BFD_ALIGN (obj_textsec (abfd)->_raw_size, 0x2000), esdl.ld_text); - + if (! bfd_set_section_contents (abfd, sdyn->output_section, &esdl, (sdyn->output_offset + sizeof esd diff --git a/bfd/syms.c b/bfd/syms.c index 82c8112..8f4c92f 100644 --- a/bfd/syms.c +++ b/bfd/syms.c @@ -91,7 +91,6 @@ SUBSECTION All storage for the symbols themselves is in an objalloc connected to the BFD; it is freed when the BFD is closed. - INODE Writing Symbols, Mini Symbols, Reading Symbols, Symbols SUBSECTION @@ -163,8 +162,6 @@ SUBSECTION */ - - /* DOCDD INODE @@ -390,14 +387,12 @@ DESCRIPTION Return the actual number of symbol pointers, not including the NULL. - .#define bfd_canonicalize_symtab(abfd, location) \ . BFD_SEND (abfd, _bfd_canonicalize_symtab,\ . (abfd, location)) */ - /* FUNCTION bfd_set_symtab @@ -474,7 +469,6 @@ bfd_print_symbol_vandf (arg, symbol) : ((type & BSF_OBJECT) ? 'O' : ' ')))); } - /* FUNCTION bfd_make_empty_symbol @@ -537,7 +531,7 @@ static CONST struct section_to_type stt[] = }; /* Return the single-character symbol type corresponding to - section S, or '?' for an unknown COFF section. + section S, or '?' for an unknown COFF section. Check for any leading string which matches, so .text5 returns 't' as well as .text */ @@ -548,7 +542,7 @@ coff_section_type (s) { CONST struct section_to_type *t; - for (t = &stt[0]; t->section; t++) + for (t = &stt[0]; t->section; t++) if (!strncmp (s, t->section, strlen (t->section))) return t->type; @@ -631,7 +625,7 @@ bfd_decode_symclass (symbol) /* FUNCTION - bfd_is_undefined_symclass + bfd_is_undefined_symclass DESCRIPTION Returns non-zero if the class symbol returned by @@ -668,12 +662,12 @@ bfd_symbol_info (symbol, ret) symbol_info *ret; { ret->type = bfd_decode_symclass (symbol); - + if (bfd_is_undefined_symclass (ret->type)) ret->value = 0; else ret->value = symbol->value + symbol->section->vma; - + ret->name = symbol->name; } @@ -1005,7 +999,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound, if (bfd_get_32 (abfd, stab + STRDXOFF) == 0) continue; - /* if we did not see a function def, leave space for one. */ + /* if we did not see a function def, leave space for one. */ if (saw_fun == 0) ++info->indextablesize; @@ -1027,7 +1021,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound, if (saw_fun == 0) ++info->indextablesize; - + if (info->indextablesize == 0) return true; ++info->indextablesize; @@ -1063,8 +1057,8 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound, /* The following code creates a new indextable entry with a NULL function name if there were no N_FUNs in a file. Note that a N_SO without a file name is an EOF and - there could be 2 N_SO following it with the new filename - and directory. */ + there could be 2 N_SO following it with the new filename + and directory. */ if (saw_fun == 0) { info->indextable[i].val = bfd_get_32 (abfd, last_stab + VALOFF); @@ -1076,7 +1070,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound, ++i; } saw_fun = 0; - + file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF); if (*file_name == '\0') { diff --git a/bfd/sysdep.h b/bfd/sysdep.h index bf3eac0..e344eaf 100644 --- a/bfd/sysdep.h +++ b/bfd/sysdep.h @@ -127,7 +127,7 @@ extern char *getenv (); #ifdef ENABLE_NLS #include /* Note the use of dgetext() and PACKAGE here, rather than gettext(). - + This is because the code in this directory is used to build a library which will be linked with code in other directories to form programs. We want to maintain a seperate translation file for this directory however, rather -- cgit v1.1