Import of Binutils from the FSF 2.13 branch (just pre-.2 release).

These bits are taken from the FSF anoncvs repo on 27-Oct-2002 21:12:00 EST.
This commit is contained in:
David E. O'Brien 2002-12-02 09:06:04 +00:00
parent 0320623115
commit 898696a8b3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/binutils/dist/; revision=107492
127 changed files with 18514 additions and 2814 deletions

View File

@ -1,7 +1,276 @@
2002-11-27 David O'Brien <obrien@FreeBSD.org>
* elf.c (_bfd_elf_copy_private_section_data): Don't define bed.
2002-11-21 Richard Henderson <rth@redhat.com>
* elflink.h (elf_link_add_object_symbols): Don't overwrite the
arch's st_other bits when merging visibilities.
(elf_link_output_extsym): Tidy clearing of visibility field.
2002-11-14 David O'Brien <obrien@FreeBSD.org>
Merge from mainline:
2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
* elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
references to large plt symbols.
2002-11-13 Alan Modra <amodra@bigpond.net.au>
Merge from mainline.
2002-11-07 Alan Modra <amodra@bigpond.net.au>
* elf64-ppc.c: Comment typo fixes.
(ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
2002-11-11 Nick Clifton <nickc@redhat.com>
Import this patch from mainline:
2002-09-19 Nick Clifton <nickc@redhat.com>
* elflink.h (elf_fix_symbol_flags): When examining weak symbols,
follow indirect links.
2002-11-07 Daniel Jacobowitz <drow@mvista.com>
* configure.in: Clear is_release on the branch after release.
2002-11-07 Daniel Jacobowitz <drow@mvista.com>
* configure.in: Bump version and set is_release.
* configure: Regenerate.
2002-11-07 Nick Clifton <nickc@redhat.com>
* po/da.po: Updated Danish translation.
2002-11-07 Graeme Peterson <gp@qnx.com>
* Makefile.am: Removed entries for elf32-i386qnx.c and
elf32-i386qnx.lo.
* Makefile.in: Regenerate.
* config.bfd: Changed i[3456]86-*-nto-qnx* targ_defvec from
bfd_elf32_i386qnx_vec to bfd_elf32_i386_vec.
* configure.in: Removed support for bfd_elf32_i386qnx_vec.
* configure: Regenerate.
* elf32-i386qnx.c: Removed.
* elf.c: Removed calls to QNX specific set_nonloadable_filepos,
is_contained_by_filepos, and copy_private_bfd_data_p.
* elf32-i386.c: Removed QNX specific #ifdef ELF32_I386_C_INCLUDED.
* targets.c: Removed bfd_elf32_i386qnx_vec.
* elfxx-target.h: Removed QNX specific elf_backend_set_nonloadable_filepos,
elf_backend_is_contained_by_filepos, and elf_backend_copy_private_bfd_data_p.
* elf-bfd.h: Removed QNX specific set_nonloadable_filepos,
is_contained_by_filepos, and copy_private_bfd_data_p.
2002-11-06 David O'Brien <obrien@FreeBSD.org>
Alan Modra <amodra@bigpond.net.au>
* elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
dynamic relocs against section symbols for the output section vma.
2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
* vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
non-NULL before dereferencing.
2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* vms.c (vms_object_p): Restore the start address when returning
NULL.
2002-10-31 David O'Brien <obrien@FreeBSD.org>
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
signed and unsigned in comparison.
2002-10-30 Daniel Jacobowitz <drow@mvista.com>
* bfd-in2.h: Regenerated.
* po/SRC-POTFILES.in: Regenerated.
* po/bfd.pot: Regenerated.
2002-10-30 Daniel Jacobowitz <drow@mvista.com>
* coffcode.h: Remove extraneous '\'.
2002-10-28 Daniel Jacobowitz <drow@mvista.com>
Merge from mainline:
2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
* aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
unsigned int.
(NAME(aout,final_link)): Cast enum used in assignment.
(aout_link_write_symbols): Cast enums in comparisons, int values to
boolean, enums in assignments to int.
(aout_link_input_section_std): Cast rel->r_index to unsigned int.
(aout_link_input_section_ext): Likewise. Cast enums used in comparisons
with unsigned ints.
(aout_link_reloc_link_order): Cast enum to int in assignment.
* archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
calls to char *.
* bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
assignment.
* bfd-in2.h (bfd_set_section_vma): Likewise.
* bfd.c (bfd_record_phdr): Cast enums in assignments.
* binary.c (bfd_alloc): Cast enum to long.
* coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
* dwarf2.c (read_abbrevs): Add casts to enum types.
(read_attribute_value): Likewise.
(arange_add): Cast result of bfd_zalloc call.
(comp_unit_contains_address): Return true and false.
(comp_unit_find_nearest_line): Cast return to boolean.
* format.c (bfd_check_format_matches, bfd_set_format): Likewise.
* gen-aout.c: define macro '_' if not defined.
* libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
(bfd_bwrite): Cast bfd_realloc to bfd_byte *.
(bfd_write_bigendian_4byte_int): Cast return to boolean.
(bfd_seek): Cast bfd_realloc to bfd_byte *.
(bfd_generic_is_local_label_name): Cast return to boolean.
* libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
* linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
struct bfd_hash_entry *.
(_bfd_generic_link_hash_newfunc): likewise.
(_bfd_generic_final_link): Cast enum to unsigned int.
* merge.c (sec_merge_emit): Cast return to boolean.
(merge_strings): Add casts to const unsigned char *.
* reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
(bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
* section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
struct bfd_hash_entry *.
(bfd_set_section_content): Add cast to PTR in comparison.
* srec.c (S3Forced): Initialize to false.
(srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
* stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
(_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
* syms.c (bfd_is_undefined_symclass): Cast return to boolean.
(_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
comparisons.
2002-10-23 Jakub Jelinek <jakub@redhat.com>
* elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
relocs into shared lib non-allocated reloc sections.
2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
* dwarf2.c (add_line_info): Ensure that the line_info_table is
sorted even when given an out-of-order line sequence.
(lookup_address_in_line_info_table): When an exact VMA match is
not found, return line information with the closest VMA.
2002-10-21 Alan Modra <amodra@bigpond.net.au>
* targets.c (bfd_target_list): Don't return the default target twice.
2002-10-19 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_add_object_symbols): Correctly handle
DT_RPATH and DT_RUNPATH.
2002-10-16 Jakub Jelinek <jakub@redhat.com>
* config.bfd (s390-*-linux*): Add targ64_selvecs.
(s390x-*-linux*): Add targ_selvecs.
2002-10-16 Alan Modra <amodra@bigpond.net.au>
* elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
loaded with --just-symbols.
* elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
endian vector to targ_selvecs.
2002-10-08 H.J. Lu <hjl@gnu.org>
* elf32-i386.c (elf_i386_relocate_section): Re-arrange the
IE->LE transition for R_386_TLS_IE.
2002-10-07 Mark Elbrecht <snowball3@softhome.net>
* cofflink.c (mark_relocs): Don't mark relocations in excluded
sections.
2002-10-05 Alexandre Oliva <aoliva@redhat.com>
* elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
of the other two relocations packed with a REL32 to NONE.
2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
* elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
(sh_elf_link_hash_newfunc): Initialize it.
(allocate_dynrelocs): Transfer gotplt refs from plt.refcount
to got.refcount for symbols that are forced local or when
we have direct got refs.
(sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
to correctly adjust got.refcount and plt.refcount.
(sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
(sh_elf_check_relocs): Increment gotplt_refcount.
2002-10-01 Jakub Jelinek <jakub@redhat.com>
* elf32-i386.c (elf_i386_relocate_section): Fix
movl foo@indntpoff, %eax IE->LE transition.
2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
* elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
.got sections.
2002-09-27 Matt Thomas <matt@3am-software.com>
* elf32-vax.c (elf_vax_check_relocs): Remove unused
local_got_refcounts usage. Remove allocation of got slot.
(elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
Remove de-allocation of got slot.
(elf_vax_size_dynamic_section): Fix some indentation. Add hash
traversal for elf_vax_instantiate_got_entries. Allow empty .got
sections to be GC'ed.
(elf_vax_instantiate_got_entries): New function.
(elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
tests that are now handled by elf_vax_instantiate_got_entries.
Assert GOT entry falls within .got section size. Remove redundant
comparisions. Fix comments.
2002-09-24 Jakub Jelinek <jakub@redhat.com>
* elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
addend into r_addend, not *r_offset.
(elf32_sparc_finish_dynamic_symbol): Likewise.
* elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
R_SPARC_RELATIVE's r_offset.
2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
mismatch.
2002-10-14 Richard Henderson <rth@redhat.com>
* elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
VALUE, not ADDEND.
2002-10-11 Alan Modra <amodra@bigpond.net.au>
* coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
(record_thumb_to_arm_glue): Likewise.
* ecoff.c (ecoff_link_add_externals): Likewise.
* elf32-arm.h (record_arm_to_thumb_glue): Likewise.
(record_thumb_to_arm_glue): Likewise.
* elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
* elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
* elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
* elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
* elf64-ppc.c (func_desc_adjust): Likewise.
* elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
(sh64_elf64_create_dynamic_sections): Likewise.
* elflink.c (_bfd_elf_create_got_section): Likewise.
(_bfd_elf_create_dynamic_sections): Likewise.
(_bfd_elf_create_linker_section): Likewise.
* elflink.h (elf_add_default_symbol): Likewise.
(elf_link_create_dynamic_sections): Likewise.
(NAME(bfd_elf,size_dynamic_sections)): Likewise.
* elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
* elfxx-mips.c (mips_elf_create_got_section): Likewise.
(_bfd_mips_elf_add_symbol_hook): Likewise.
(_bfd_mips_elf_create_dynamic_sections): Likewise.
* linker.c (generic_link_add_symbol_list): Likewise.
* xcofflink.c (xcoff_link_add_symbols): Likewise.
* elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
* elf64-ppc.c (edit_opd): Only zero opd syms when function is
completely removed.
completely removed. Correct local sym adjustment.
2002-10-08 Alan Modra <amodra@bigpond.net.au>

View File

@ -211,7 +211,6 @@ BFD32_BACKENDS = \
elf32-i370.lo \
elf32-i386.lo \
elf32-i386-fbsd.lo \
elf32-i386qnx.lo \
elf32-i860.lo \
elf32-i960.lo \
elf32-ia64.lo \
@ -369,7 +368,6 @@ BFD32_BACKENDS_CFILES = \
elf32-i370.c \
elf32-i386.c \
elf32-i386-fbsd.c \
elf32-i386qnx.c \
elf32-i860.c \
elf32-i960.c \
elf32-m32r.c \
@ -1145,10 +1143,6 @@ elf32-i386-fbsd.lo: elf32-i386-fbsd.c elf32-i386.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \

View File

@ -1,6 +1,6 @@
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -339,7 +339,6 @@ BFD32_BACKENDS = \
elf32-i370.lo \
elf32-i386.lo \
elf32-i386-fbsd.lo \
elf32-i386qnx.lo \
elf32-i860.lo \
elf32-i960.lo \
elf32-ia64.lo \
@ -498,7 +497,6 @@ BFD32_BACKENDS_CFILES = \
elf32-i370.c \
elf32-i386.c \
elf32-i386-fbsd.c \
elf32-i386qnx.c \
elf32-i860.c \
elf32-i960.c \
elf32-m32r.c \
@ -933,7 +931,7 @@ maintainer-clean-recursive:
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
test "$$subdir" != "." || dot_seen=yes; \
test "$$subdir" = "." && dot_seen=yes; \
done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \
@ -1675,10 +1673,6 @@ elf32-i386-fbsd.lo: elf32-i386-fbsd.c elf32-i386.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \

View File

@ -1,5 +1,5 @@
/* BFD back-end for TMS320C30 a.out binaries.
Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
This file is part of BFD, the Binary File Descriptor library.
@ -965,6 +965,9 @@ tic30_aout_set_arch_mach (abfd, arch, machine)
#ifndef MY_bfd_merge_sections
#define MY_bfd_merge_sections bfd_generic_merge_sections
#endif
#ifndef MY_bfd_discard_group
#define MY_bfd_discard_group bfd_generic_discard_group
#endif
#ifndef MY_bfd_reloc_type_lookup
#define MY_bfd_reloc_type_lookup tic30_aout_reloc_type_lookup
#endif
@ -980,9 +983,15 @@ tic30_aout_set_arch_mach (abfd, arch, machine)
#ifndef MY_bfd_link_hash_table_create
#define MY_bfd_link_hash_table_create NAME(aout,link_hash_table_create)
#endif
#ifndef MY_bfd_link_hash_table_free
#define MY_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#endif
#ifndef MY_bfd_link_add_symbols
#define MY_bfd_link_add_symbols NAME(aout,link_add_symbols)
#endif
#ifndef MY_bfd_link_just_syms
#define MY_bfd_link_just_syms _bfd_generic_link_just_syms
#endif
#ifndef MY_bfd_link_split_section
#define MY_bfd_link_split_section _bfd_generic_link_split_section
#endif

View File

@ -2259,8 +2259,8 @@ NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
/* now the fun stuff */
if (bfd_header_big_endian (abfd))
{
r_index = ((bytes->r_index[0] << 16)
| (bytes->r_index[1] << 8)
r_index = (((unsigned int) bytes->r_index[0] << 16)
| ((unsigned int) bytes->r_index[1] << 8)
| bytes->r_index[2]);
r_extern = (0 != (bytes->r_type[0] & RELOC_EXT_BITS_EXTERN_BIG));
r_type = ((bytes->r_type[0] & RELOC_EXT_BITS_TYPE_BIG)
@ -2268,8 +2268,8 @@ NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
}
else
{
r_index = ((bytes->r_index[2] << 16)
| (bytes->r_index[1] << 8)
r_index = (((unsigned int) bytes->r_index[2] << 16)
| ((unsigned int) bytes->r_index[1] << 8)
| bytes->r_index[0]);
r_extern = (0 != (bytes->r_type[0] & RELOC_EXT_BITS_EXTERN_LITTLE));
r_type = ((bytes->r_type[0] & RELOC_EXT_BITS_TYPE_LITTLE)
@ -2281,9 +2281,9 @@ NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
/* Base relative relocs are always against the symbol table,
regardless of the setting of r_extern. r_extern just reflects
whether the symbol the reloc is against is local or global. */
if (r_type == RELOC_BASE10
|| r_type == RELOC_BASE13
|| r_type == RELOC_BASE22)
if (r_type == (unsigned int) RELOC_BASE10
|| r_type == (unsigned int) RELOC_BASE13
|| r_type == (unsigned int) RELOC_BASE22)
r_extern = 1;
if (r_extern && r_index > symcount)
@ -2318,8 +2318,8 @@ NAME(aout,swap_std_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
/* now the fun stuff */
if (bfd_header_big_endian (abfd))
{
r_index = ((bytes->r_index[0] << 16)
| (bytes->r_index[1] << 8)
r_index = (((unsigned int) bytes->r_index[0] << 16)
| ((unsigned int) bytes->r_index[1] << 8)
| bytes->r_index[2]);
r_extern = (0 != (bytes->r_type[0] & RELOC_STD_BITS_EXTERN_BIG));
r_pcrel = (0 != (bytes->r_type[0] & RELOC_STD_BITS_PCREL_BIG));
@ -2331,8 +2331,8 @@ NAME(aout,swap_std_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
}
else
{
r_index = ((bytes->r_index[2] << 16)
| (bytes->r_index[1] << 8)
r_index = (((unsigned int) bytes->r_index[2] << 16)
| ((unsigned int) bytes->r_index[1] << 8)
| bytes->r_index[0]);
r_extern = (0 != (bytes->r_type[0] & RELOC_STD_BITS_EXTERN_LITTLE));
r_pcrel = (0 != (bytes->r_type[0] & RELOC_STD_BITS_PCREL_LITTLE));
@ -3863,7 +3863,7 @@ NAME(aout,final_link) (abfd, info, callback)
for (p = o->link_order_head; p != NULL; p = p->next)
{
if (p->type == bfd_indirect_link_order)
p->u.indirect.section->linker_mark = true;
p->u.indirect.section->linker_mark = (unsigned int) true;
}
}
@ -4412,7 +4412,7 @@ aout_link_write_symbols (finfo, input_bfd)
characters in the symbol names, not including the file
numbers in types (the first number after an open
parenthesis). */
if (type == N_BINCL)
if (type == (int) N_BINCL)
{
struct external_nlist *incl_sym;
int nest;
@ -4426,13 +4426,13 @@ aout_link_write_symbols (finfo, input_bfd)
int incl_type;
incl_type = H_GET_8 (input_bfd, incl_sym->e_type);
if (incl_type == N_EINCL)
if (incl_type == (int) N_EINCL)
{
if (nest == 0)
break;
--nest;
}
else if (incl_type == N_BINCL)
else if (incl_type == (int) N_BINCL)
++nest;
else if (nest == 0)
{
@ -4457,7 +4457,7 @@ aout_link_write_symbols (finfo, input_bfd)
/* If we have already included a header file with the
same value, then replace this one with an N_EXCL
symbol. */
copy = ! finfo->info->keep_memory;
copy = (boolean) (! finfo->info->keep_memory);
incl_entry = aout_link_includes_lookup (&finfo->includes,
name, true, copy);
if (incl_entry == NULL)
@ -4485,7 +4485,7 @@ aout_link_write_symbols (finfo, input_bfd)
/* This is a duplicate header file. We must change
it to be an N_EXCL entry, and mark all the
included symbols to prevent outputting them. */
type = N_EXCL;
type = (int) N_EXCL;
nest = 0;
for (incl_sym = sym + 1, incl_map = symbol_map + 1;
@ -4495,7 +4495,7 @@ aout_link_write_symbols (finfo, input_bfd)
int incl_type;
incl_type = H_GET_8 (input_bfd, incl_sym->e_type);
if (incl_type == N_EINCL)
if (incl_type == (int) N_EINCL)
{
if (nest == 0)
{
@ -4504,7 +4504,7 @@ aout_link_write_symbols (finfo, input_bfd)
}
--nest;
}
else if (incl_type == N_BINCL)
else if (incl_type == (int) N_BINCL)
++nest;
else if (nest == 0)
*incl_map = -1;
@ -4859,8 +4859,8 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
if (bfd_header_big_endian (input_bfd))
{
r_index = ((rel->r_index[0] << 16)
| (rel->r_index[1] << 8)
r_index = (((unsigned int) rel->r_index[0] << 16)
| ((unsigned int) rel->r_index[1] << 8)
| rel->r_index[2]);
r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG));
r_pcrel = (0 != (rel->r_type[0] & RELOC_STD_BITS_PCREL_BIG));
@ -4872,8 +4872,8 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
}
else
{
r_index = ((rel->r_index[2] << 16)
| (rel->r_index[1] << 8)
r_index = (((unsigned int) rel->r_index[2] << 16)
| ((unsigned int) rel->r_index[1] << 8)
| rel->r_index[0]);
r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_LITTLE));
r_pcrel = (0 != (rel->r_type[0] & RELOC_STD_BITS_PCREL_LITTLE));
@ -5195,8 +5195,8 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
if (bfd_header_big_endian (input_bfd))
{
r_index = ((rel->r_index[0] << 16)
| (rel->r_index[1] << 8)
r_index = (((unsigned int) rel->r_index[0] << 16)
| ((unsigned int) rel->r_index[1] << 8)
| rel->r_index[2]);
r_extern = (0 != (rel->r_type[0] & RELOC_EXT_BITS_EXTERN_BIG));
r_type = ((rel->r_type[0] & RELOC_EXT_BITS_TYPE_BIG)
@ -5204,8 +5204,8 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
}
else
{
r_index = ((rel->r_index[2] << 16)
| (rel->r_index[1] << 8)
r_index = (((unsigned int) rel->r_index[2] << 16)
| ((unsigned int) rel->r_index[1] << 8)
| rel->r_index[0]);
r_extern = (0 != (rel->r_type[0] & RELOC_EXT_BITS_EXTERN_LITTLE));
r_type = ((rel->r_type[0] & RELOC_EXT_BITS_TYPE_LITTLE)
@ -5221,16 +5221,16 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
/* We are generating a relocateable output file, and must
modify the reloc accordingly. */
if (r_extern
|| r_type == RELOC_BASE10
|| r_type == RELOC_BASE13
|| r_type == RELOC_BASE22)
|| r_type == (unsigned int) RELOC_BASE10
|| r_type == (unsigned int) RELOC_BASE13
|| r_type == (unsigned int) RELOC_BASE22)
{
/* If we know the symbol this relocation is against,
convert it into a relocation against a section. This
is what the native linker does. */
if (r_type == RELOC_BASE10
|| r_type == RELOC_BASE13
|| r_type == RELOC_BASE22)
if (r_type == (unsigned int) RELOC_BASE10
|| r_type == (unsigned int) RELOC_BASE13
|| r_type == (unsigned int) RELOC_BASE22)
h = NULL;
else
h = sym_hashes[r_index];
@ -5398,9 +5398,9 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
relocation = 0;
}
}
else if (r_type == RELOC_BASE10
|| r_type == RELOC_BASE13
|| r_type == RELOC_BASE22)
else if (r_type == (unsigned int) RELOC_BASE10
|| r_type == (unsigned int) RELOC_BASE13
|| r_type == (unsigned int) RELOC_BASE22)
{
struct external_nlist *sym;
int type;
@ -5482,9 +5482,9 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
to skip this reloc. */
if (hundef
&& ! finfo->info->shared
&& r_type != RELOC_BASE10
&& r_type != RELOC_BASE13
&& r_type != RELOC_BASE22)
&& r_type != (unsigned int) RELOC_BASE10
&& r_type != (unsigned int) RELOC_BASE13
&& r_type != (unsigned int) RELOC_BASE22)
{
const char *name;
@ -5498,7 +5498,7 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
return false;
}
if (r_type != RELOC_SPARC_REV32)
if (r_type != (unsigned int) RELOC_SPARC_REV32)
r = MY_final_link_relocate (howto_table_ext + r_type,
input_bfd, input_section,
contents, r_addr, relocation,
@ -5527,9 +5527,9 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
if (h != NULL)
name = h->root.root.string;
else if (r_extern
|| r_type == RELOC_BASE10
|| r_type == RELOC_BASE13
|| r_type == RELOC_BASE22)
|| r_type == (unsigned int) RELOC_BASE10
|| r_type == (unsigned int) RELOC_BASE13
|| r_type == (unsigned int) RELOC_BASE22)
name = strings + GET_WORD (input_bfd,
syms[r_index].e_strx);
else
@ -5645,7 +5645,7 @@ aout_link_reloc_link_order (finfo, o, p)
int r_relative;
int r_length;
r_pcrel = howto->pc_relative;
r_pcrel = (int) howto->pc_relative;
r_baserel = (howto->type & 8) != 0;
r_jmptable = (howto->type & 16) != 0;
r_relative = (howto->type & 32) != 0;

View File

@ -436,12 +436,12 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag)
spaces, so only look for ' ' if we don't find '/'. */
char *e;
e = memchr (hdr.ar_name, '\0', ar_maxnamelen (abfd));
e = (char *) memchr (hdr.ar_name, '\0', ar_maxnamelen (abfd));
if (e == NULL)
{
e = memchr (hdr.ar_name, '/', ar_maxnamelen (abfd));
e = (char *) memchr (hdr.ar_name, '/', ar_maxnamelen (abfd));
if (e == NULL)
e = memchr (hdr.ar_name, ' ', ar_maxnamelen (abfd));
e = (char *) memchr (hdr.ar_name, ' ', ar_maxnamelen (abfd));
}
if (e != NULL)

View File

@ -346,7 +346,7 @@ typedef struct sec *sec_ptr;
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (boolean)true), true)
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (unsigned int)true), true)
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true)
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true)

View File

@ -352,7 +352,7 @@ typedef struct sec *sec_ptr;
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (boolean)true), true)
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (unsigned int)true), true)
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true)
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true)
@ -3634,7 +3634,7 @@ extern bfd_byte *bfd_get_relocated_section_contents
boolean, asymbol **));
boolean
bfd_alt_mach_code PARAMS ((bfd *abfd, int index));
bfd_alt_mach_code PARAMS ((bfd *abfd, int alternative));
/* Extracted from archive.c. */
symindex

View File

@ -1293,10 +1293,10 @@ bfd_record_phdr (abfd, type, flags_valid, flags, at_valid, at,
m->p_type = type;
m->p_flags = flags;
m->p_paddr = at;
m->p_flags_valid = flags_valid;
m->p_paddr_valid = at_valid;
m->includes_filehdr = includes_filehdr;
m->includes_phdrs = includes_phdrs;
m->p_flags_valid = (unsigned int) flags_valid;
m->p_paddr_valid = (unsigned int) at_valid;
m->includes_filehdr = (unsigned int) includes_filehdr;
m->includes_phdrs = (unsigned int) includes_phdrs;
m->count = count;
if (count > 0)
memcpy (m->sections, secs, count * sizeof (asection *));

View File

@ -185,7 +185,7 @@ binary_get_symtab (abfd, alocation)
syms = (asymbol *) bfd_alloc (abfd, amt);
if (syms == NULL)
return false;
return (long) false;
/* Start symbol. */
syms[0].the_bfd = abfd;

View File

@ -1881,6 +1881,7 @@ record_arm_to_thumb_glue (info, h)
register asection * s;
char * tmp_name;
struct coff_link_hash_entry * myh;
struct bfd_link_hash_entry * bh;
struct coff_arm_link_hash_table * globals;
bfd_vma val;
bfd_size_type amt;
@ -1915,10 +1916,10 @@ record_arm_to_thumb_glue (info, h)
though the section isn't allocated yet, this is where we will be putting
it. */
bh = NULL;
val = globals->arm_glue_size + 1;
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
BSF_GLOBAL, s, val, NULL, true, false,
(struct bfd_link_hash_entry **) & myh);
BSF_GLOBAL, s, val, NULL, true, false, &bh);
free (tmp_name);
@ -1937,6 +1938,7 @@ record_thumb_to_arm_glue (info, h)
register asection * s;
char * tmp_name;
struct coff_link_hash_entry * myh;
struct bfd_link_hash_entry * bh;
struct coff_arm_link_hash_table * globals;
bfd_vma val;
bfd_size_type amt;
@ -1967,12 +1969,13 @@ record_thumb_to_arm_glue (info, h)
return; /* we've already seen this guy */
}
bh = NULL;
val = globals->thumb_glue_size + 1;
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
BSF_GLOBAL, s, val, NULL, true, false,
(struct bfd_link_hash_entry **) &myh);
BSF_GLOBAL, s, val, NULL, true, false, &bh);
/* If we mark it 'thumb', the disassembler will do a better job. */
myh = (struct coff_link_hash_entry *) bh;
myh->class = C_THUMBEXTFUNC;
free (tmp_name);
@ -1989,11 +1992,10 @@ record_thumb_to_arm_glue (info, h)
sprintf (tmp_name, globals->support_old_code ? BACK_FROM_ARM : CHANGE_TO_ARM, name);
myh = NULL;
bh = NULL;
val = globals->thumb_glue_size + (globals->support_old_code ? 8 : 4);
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
BSF_LOCAL, s, val, NULL, true, false,
(struct bfd_link_hash_entry **) & myh);
BSF_LOCAL, s, val, NULL, true, false, &bh);
free (tmp_name);

File diff suppressed because it is too large Load Diff

View File

@ -1246,7 +1246,7 @@ Special entry points for gdb to swap in coff symbol table parts:
. struct coff_link_hash_entry *, struct internal_syment *,
. bfd_vma *));
.
. boolean (*_bfd_coff_adjust_symndx)\
. boolean (*_bfd_coff_adjust_symndx)
. PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
. struct internal_reloc *, boolean *));
.

View File

@ -2196,7 +2196,7 @@ _bfd_coff_is_local_label_name (abfd, name)
bfd *abfd ATTRIBUTE_UNUSED;
const char *name;
{
return name[0] == '.' && name[1] == 'L';
return (boolean) (name[0] == '.' && name[1] == 'L');
}
/* Provided a BFD, a section and an offset (in bytes, not octets) into the

View File

@ -1322,6 +1322,9 @@ mark_relocs (finfo, input_bfd)
if ((a->flags & SEC_RELOC) == 0 || a->reloc_count < 1)
continue;
/* Don't mark relocs in excluded sections. */
if (a->output_section == bfd_abs_section_ptr)
continue;
/* Read in the relocs. */
internal_relocs = _bfd_coff_read_internal_relocs

View File

@ -359,8 +359,8 @@ case "${targ}" in
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386coff_vec
;;
i[3456]86-*-nto-qnx*)
targ_defvec=bfd_elf32_i386qnx_vec
i[3456]86-*-nto*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386coff_vec
;;
i[3456]86-*-chorus*)
@ -888,10 +888,12 @@ case "${targ}" in
s390-*-linux*)
targ_defvec=bfd_elf32_s390_vec
targ64_selvecs=bfd_elf64_s390_vec
;;
#ifdef BFD64
s390x-*-linux*)
targ_defvec=bfd_elf64_s390_vec
targ_selvecs=bfd_elf32_s390_vec
;;
#endif
@ -925,9 +927,11 @@ case "${targ}" in
;;
sh*eb-*-linux*)
targ_defvec=bfd_elf32_shblin_vec
targ_selvecs=bfd_elf32_shlin_vec
;;
sh*-*-linux*)
targ_defvec=bfd_elf32_shlin_vec
targ_selvecs=bfd_elf32_shblin_vec
;;
#ifdef BFD64

View File

@ -1,4 +1,4 @@
/* config.in. Generated automatically from configure.in by autoheader. */
/* config.in. Generated automatically from configure.in by autoheader 2.13. */
/* Define if using alloca.c. */
#undef C_ALLOCA
@ -160,15 +160,9 @@
/* Define if you have the <sys/procfs.h> header file. */
#undef HAVE_SYS_PROCFS_H
/* Define if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define if you have the <time.h> header file. */
#undef HAVE_TIME_H

View File

@ -1118,7 +1118,7 @@ fi
PACKAGE=bfd
VERSION=2.13
VERSION=2.13.1
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
{ echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
@ -6063,7 +6063,6 @@ do
bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386-fbsd.lo elf32.lo $elf" ;;
bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
bfd_elf32_i386qnx_vec) tb="$tb elf32-i386qnx.lo elf32.lo $elf" ;;
bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
@ -6310,10 +6309,10 @@ case ${host64}-${target64}-${want64} in
if test -n "$GCC" ; then
bad_64bit_gcc=no;
echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
echo "configure:6314: checking for gcc version with buggy 64-bit support" >&5
echo "configure:6313: checking for gcc version with buggy 64-bit support" >&5
# Add more tests for gcc versions with non-working 64-bit support here.
cat > conftest.$ac_ext <<EOF
#line 6317 "configure"
#line 6316 "configure"
#include "confdefs.h"
:__GNUC__:__GNUC_MINOR__:__i386__:
EOF
@ -6358,17 +6357,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6362: checking for $ac_hdr" >&5
echo "configure:6361: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6367 "configure"
#line 6366 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -6397,12 +6396,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6401: checking for $ac_func" >&5
echo "configure:6400: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6406 "configure"
#line 6405 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -6425,7 +6424,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:6429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:6428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -6450,7 +6449,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
echo "configure:6454: checking for working mmap" >&5
echo "configure:6453: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -6458,7 +6457,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
#line 6462 "configure"
#line 6461 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@ -6598,7 +6597,7 @@ main()
}
EOF
if { (eval echo configure:6602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:6601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@ -6623,12 +6622,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6627: checking for $ac_func" >&5
echo "configure:6626: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6632 "configure"
#line 6631 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -6651,7 +6650,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:6655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:6654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else

View File

@ -7,7 +7,7 @@ AC_INIT(libbfd.c)
AC_CANONICAL_SYSTEM
AC_ISC_POSIX
AM_INIT_AUTOMAKE(bfd, 2.13)
AM_INIT_AUTOMAKE(bfd, 2.13.1)
# Uncomment the next line to remove the date from the reported bfd version
# is_release=y
@ -577,7 +577,6 @@ do
bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386-fbsd.lo elf32.lo $elf" ;;
bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
bfd_elf32_i386qnx_vec) tb="$tb elf32-i386qnx.lo elf32.lo $elf" ;;
bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;

View File

@ -0,0 +1,168 @@
/* BFD library support routines for the Hitachi-SH architecture.
Copyright 1993, 1994, 1997, 1998, 2000, 2001
Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#if 0
/* This routine is provided two arch_infos and returns whether
they'd be compatible */
static const bfd_arch_info_type *
compatible (a,b)
const bfd_arch_info_type *a;
const bfd_arch_info_type *b;
{
if (a->arch != b->arch || a->mach != b->mach)
return NULL;
return a;
}
#endif
#define SH_NEXT &arch_info_struct[0]
#define SH2_NEXT &arch_info_struct[1]
#define SH_DSP_NEXT &arch_info_struct[2]
#define SH3_NEXT &arch_info_struct[3]
#define SH3_DSP_NEXT &arch_info_struct[4]
#define SH3E_NEXT &arch_info_struct[5]
#define SH4_NEXT NULL
#undef SH4_NEXT
#define SH4_NEXT &arch_info_struct[6]
#define SH64_NEXT NULL
static const bfd_arch_info_type arch_info_struct[] =
{
{
32, /* 32 bits in a word */
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_sh,
bfd_mach_sh2,
"sh", /* arch_name */
"sh2", /* printable name */
1,
false, /* not the default */
bfd_default_compatible,
bfd_default_scan,
SH2_NEXT
},
{
32, /* 32 bits in a word */
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_sh,
bfd_mach_sh_dsp,
"sh", /* arch_name */
"sh-dsp", /* printable name */
1,
false, /* not the default */
bfd_default_compatible,
bfd_default_scan,
SH_DSP_NEXT
},
{
32, /* 32 bits in a word */
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_sh,
bfd_mach_sh3,
"sh", /* arch_name */
"sh3", /* printable name */
1,
false, /* not the default */
bfd_default_compatible,
bfd_default_scan,
SH3_NEXT
},
{
32, /* 32 bits in a word */
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_sh,
bfd_mach_sh3_dsp,
"sh", /* arch_name */
"sh3-dsp", /* printable name */
1,
false, /* not the default */
bfd_default_compatible,
bfd_default_scan,
SH3_DSP_NEXT
},
{
32, /* 32 bits in a word */
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_sh,
bfd_mach_sh3e,
"sh", /* arch_name */
"sh3e", /* printable name */
1,
false, /* not the default */
bfd_default_compatible,
bfd_default_scan,
SH3E_NEXT
},
{
32, /* 32 bits in a word */
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_sh,
bfd_mach_sh4,
"sh", /* arch_name */
"sh4", /* printable name */
1,
false, /* not the default */
bfd_default_compatible,
bfd_default_scan,
SH4_NEXT
},
{
64, /* 64 bits in a word */
64, /* 64 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_sh,
bfd_mach_sh5,
"sh", /* arch_name */
"sh5", /* printable name */
1,
false, /* not the default */
bfd_default_compatible,
bfd_default_scan,
SH64_NEXT
},
};
const bfd_arch_info_type bfd_sh_arch =
{
32, /* 32 bits in a word */
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_sh,
bfd_mach_sh,
"sh", /* arch_name */
"sh", /* printable name */
1,
true, /* the default machine */
bfd_default_compatible,
bfd_default_scan,
SH_NEXT
};

View File

@ -1,6 +1,6 @@
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -330,7 +330,7 @@ uninstall-info:
else ii=; fi; \
list='$(INFO_DEPS)'; \
for file in $$list; do \
test -z "$$ii" \
test -z "$ii" \
|| install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
done
@$(NORMAL_UNINSTALL)

View File

@ -104,6 +104,9 @@ struct _bfd
/* Symbol table for output BFD (with symcount entries). */
struct symbol_cache_entry **outsymbols;
/* Used for slurped dynamic symbol tables. */
unsigned int dynsymcount;
/* Pointer to structure which contains architecture information. */
const struct bfd_arch_info *arch_info;
@ -661,12 +664,12 @@ extern bfd_byte *bfd_get_relocated_section_contents
@subsubsection @code{bfd_alt_mach_code}
@strong{Synopsis}
@example
boolean bfd_alt_mach_code(bfd *abfd, int index);
boolean bfd_alt_mach_code(bfd *abfd, int alternative);
@end example
@strong{Description}@*
When more than one machine code number is available for the
same machine type, this function can be used to switch between
the preferred one (index == 0) and any others. Currently,
the preferred one (alternative == 0) and any others. Currently,
only ELF supports this feature, with up to two alternate
machine codes.

View File

@ -398,7 +398,7 @@ typedef struct
struct coff_link_hash_entry *, struct internal_syment *,
bfd_vma *));
boolean (*_bfd_coff_adjust_symndx)\
boolean (*_bfd_coff_adjust_symndx)
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
struct internal_reloc *, boolean *));

View File

@ -804,6 +804,9 @@ MIPS ELF relocations.
@deffnx {} BFD_RELOC_386_RELATIVE
@deffnx {} BFD_RELOC_386_GOTOFF
@deffnx {} BFD_RELOC_386_GOTPC
@deffnx {} BFD_RELOC_386_TLS_TPOFF
@deffnx {} BFD_RELOC_386_TLS_IE
@deffnx {} BFD_RELOC_386_TLS_GOTIE
@deffnx {} BFD_RELOC_386_TLS_LE
@deffnx {} BFD_RELOC_386_TLS_GD
@deffnx {} BFD_RELOC_386_TLS_LDM

View File

@ -402,7 +402,7 @@ read_indirect_string (unit, buf, bytes_read_ptr)
return NULL;
}
buf = stash->dwarf_str_buffer + offset;
buf = stash->dwarf_str_buffer + offset;
if (*buf == '\0')
return NULL;
return buf;
@ -578,7 +578,8 @@ read_abbrevs (abfd, offset, stash)
/* Read in abbrev header. */
cur_abbrev->number = abbrev_number;
cur_abbrev->tag = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
cur_abbrev->tag = (enum dwarf_tag)
read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
abbrev_ptr += bytes_read;
cur_abbrev->has_children = read_1_byte (abfd, abbrev_ptr);
abbrev_ptr += 1;
@ -601,8 +602,10 @@ read_abbrevs (abfd, offset, stash)
return 0;
}
cur_abbrev->attrs[cur_abbrev->num_attrs].name = abbrev_name;
cur_abbrev->attrs[cur_abbrev->num_attrs++].form = abbrev_form;
cur_abbrev->attrs[cur_abbrev->num_attrs].name
= (enum dwarf_attribute) abbrev_name;
cur_abbrev->attrs[cur_abbrev->num_attrs++].form
= (enum dwarf_form) abbrev_form;
abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
abbrev_ptr += bytes_read;
abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
@ -614,7 +617,7 @@ read_abbrevs (abfd, offset, stash)
abbrevs[hash_number] = cur_abbrev;
/* Get next abbreviation.
Under Irix6 the abbreviations for a compilation unit are not
Under Irix6 the abbreviations for a compilation unit are not
always properly terminated with an abbrev number of 0.
Exit loop if we encounter an abbreviation which we have
already read (which means we are about to read the abbreviations
@ -646,7 +649,7 @@ read_attribute_value (attr, form, unit, info_ptr)
struct dwarf_block *blk;
bfd_size_type amt;
attr->form = form;
attr->form = (enum dwarf_form) form;
switch (form)
{
@ -806,7 +809,8 @@ struct line_info_table
char* comp_dir;
char** dirs;
struct fileinfo* files;
struct line_info* last_line;
struct line_info* last_line; /* largest VMA */
struct line_info* lcl_head; /* local head; used in 'add_line_info' */
};
struct funcinfo
@ -817,6 +821,11 @@ struct funcinfo
bfd_vma high;
};
/* add_line_info: adds a new entry to the line_info list in the
line_info_table, ensuring that the list is sorted. Note that the
line_info list is sorted from highest to lowest VMA (with possible
duplicates); that is, line_info->prev_line always accesses an equal
or smaller VMA. */
static void
add_line_info (table, address, filename, line, column, end_sequence)
struct line_info_table* table;
@ -829,9 +838,72 @@ add_line_info (table, address, filename, line, column, end_sequence)
bfd_size_type amt = sizeof (struct line_info);
struct line_info* info = (struct line_info*) bfd_alloc (table->abfd, amt);
info->prev_line = table->last_line;
table->last_line = info;
/* Find the correct location for 'info'. Normally we will receive
new line_info data 1) in order and 2) with increasing VMAs.
However some compilers break the rules (cf. decode_line_info) and
so we include some heuristics for quickly finding the correct
location for 'info'. In particular, these heuristics optimize for
the common case in which the VMA sequence that we receive is a
list of locally sorted VMAs such as
p...z a...j (where a < j < p < z)
Note: table->lcl_head is used to head an *actual* or *possible*
sequence within the list (such as a...j) that is not directly
headed by table->last_line
Note: we may receive duplicate entries from 'decode_line_info'. */
while (1)
if (!table->last_line
|| address >= table->last_line->address)
{
/* Normal case: add 'info' to the beginning of the list */
info->prev_line = table->last_line;
table->last_line = info;
/* lcl_head: initialize to head a *possible* sequence at the end. */
if (!table->lcl_head)
table->lcl_head = info;
break;
}
else if (!table->lcl_head->prev_line
&& table->lcl_head->address > address)
{
/* Abnormal but easy: lcl_head is 1) at the *end* of the line
list and 2) the head of 'info'. */
info->prev_line = NULL;
table->lcl_head->prev_line = info;
break;
}
else if (table->lcl_head->prev_line
&& table->lcl_head->address > address
&& address >= table->lcl_head->prev_line->address)
{
/* Abnormal but easy: lcl_head is 1) in the *middle* of the line
list and 2) the head of 'info'. */
info->prev_line = table->lcl_head->prev_line;
table->lcl_head->prev_line = info;
break;
}
else
{
/* Abnormal and hard: Neither 'last_line' nor 'lcl_head' are valid
heads for 'info'. Reset 'lcl_head' and repeat. */
struct line_info* li2 = table->last_line; /* always non-NULL */
struct line_info* li1 = li2->prev_line;
while (li1)
{
if (li2->address > address && address >= li1->address)
break;
li2 = li1; /* always non-NULL */
li1 = li1->prev_line;
}
table->lcl_head = li2;
}
/* Set member data of 'info'. */
info->address = address;
info->filename = filename;
info->line = line;
@ -908,7 +980,8 @@ arange_add (unit, low_pc, high_pc)
}
/* Need to allocate a new arange and insert it into the arange list. */
arange = bfd_zalloc (unit->abfd, (bfd_size_type) sizeof (*arange));
arange = (struct arange *)
bfd_zalloc (unit->abfd, (bfd_size_type) sizeof (*arange));
arange->low = low_pc;
arange->high = high_pc;
@ -982,6 +1055,7 @@ decode_line_info (unit, stash)
table->files = NULL;
table->last_line = NULL;
table->lcl_head = NULL;
line_ptr = stash->dwarf_line_buffer + unit->line_offset;
@ -1091,10 +1165,10 @@ decode_line_info (unit, stash)
int basic_block = 0;
int end_sequence = 0;
/* eraxxon@alumni.rice.edu: Against the DWARF2 specs, some
compilers generate address sequences that are wildly out of
order using DW_LNE_set_address (e.g. Intel C++ 6.0 compiler
for ia64-Linux). Thus, to determine the low and high
address, we must compare on every DW_LNS_copy, etc. */
compilers generate address sequences that are wildly out of
order using DW_LNE_set_address (e.g. Intel C++ 6.0 compiler
for ia64-Linux). Thus, to determine the low and high
address, we must compare on every DW_LNS_copy, etc. */
bfd_vma low_pc = 0;
bfd_vma high_pc = 0;
@ -1133,12 +1207,11 @@ decode_line_info (unit, stash)
end_sequence = 1;
add_line_info (table, address, filename, line, column,
end_sequence);
arange_add (unit, low_pc, high_pc);
if (low_pc == 0 || address < low_pc)
low_pc = address;
if (address > high_pc)
high_pc = address;
arange_add (unit, low_pc, address);
arange_add (unit, low_pc, high_pc);
break;
case DW_LNE_set_address:
address = read_address (unit, line_ptr);
@ -1250,19 +1323,31 @@ lookup_address_in_line_info_table (table, addr, function, filename_ptr,
const char **filename_ptr;
unsigned int *linenumber_ptr;
{
/* Note: table->last_line should be a descendingly sorted list. */
struct line_info* next_line = table->last_line;
struct line_info* each_line;
struct line_info* each_line = NULL;
*filename_ptr = NULL;
if (!next_line)
return false;
each_line = next_line->prev_line;
/* Check for large addresses */
if (addr > next_line->address)
each_line = NULL; /* ensure we skip over the normal case */
/* Normal case: search the list; save */
while (each_line && next_line)
{
if (!each_line->end_sequence
&& addr >= each_line->address && addr < next_line->address)
/* If we have an address match, save this info. This allows us
to return as good as results as possible for strange debugging
info. */
boolean addr_match = false;
if (each_line->address <= addr && addr <= next_line->address)
{
addr_match = true;
/* If this line appears to span functions, and addr is in the
later function, return the first line of that function instead
of the last line of the earlier one. This check is for GCC
@ -1279,16 +1364,22 @@ lookup_address_in_line_info_table (table, addr, function, filename_ptr,
*filename_ptr = each_line->filename;
*linenumber_ptr = each_line->line;
}
return true;
}
if (addr_match && !each_line->end_sequence)
return true; /* we have definitely found what we want */
next_line = each_line;
each_line = each_line->prev_line;
}
/* At this point each_line is NULL but next_line is not. If we found the
containing function in this compilation unit, return the first line we
have a number for. This is also for compatibility with GCC 2.95. */
if (function != NULL)
/* At this point each_line is NULL but next_line is not. If we found
a candidate end-of-sequence point in the loop above, we can return
that (compatibility with a bug in the Intel compiler); otherwise,
assuming that we found the containing function for this address in
this compilation unit, return the first line we have a number for
(compatibility with GCC 2.95). */
if (*filename_ptr == NULL && function != NULL)
{
*filename_ptr = next_line->filename;
*linenumber_ptr = next_line->line;
@ -1646,18 +1737,18 @@ comp_unit_contains_address (unit, addr)
struct arange *arange;
if (unit->error)
return 0;
return false;
arange = &unit->arange;
do
{
if (addr >= arange->low && addr < arange->high)
return 1;
return true;
arange = arange->next;
}
while (arange);
return 0;
return false;
}
/* If UNIT contains ADDR, set the output parameters to the values for
@ -1702,7 +1793,7 @@ comp_unit_find_nearest_line (unit, addr, filename_ptr, functionname_ptr,
}
if (unit->first_child_die_ptr < unit->end_ptr
&& ! scan_unit_for_functions (unit))
&& ! scan_unit_for_functions (unit))
{
unit->error = 1;
return false;
@ -1715,7 +1806,7 @@ comp_unit_find_nearest_line (unit, addr, filename_ptr, functionname_ptr,
line_p = lookup_address_in_line_info_table (unit->line_table, addr,
function, filename_ptr,
linenumber_ptr);
return line_p || func_p;
return (boolean) (line_p || func_p);
}
/* Locate a section in a BFD containing debugging info. The search starts
@ -1822,7 +1913,7 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
return false;
/* There can be more than one DWARF2 info section in a BFD these days.
Read them all in and produce one large stash. We do this in two
Read them all in and produce one large stash. We do this in two
passes - in the first pass we just accumulate the section sizes.
In the second pass we read in the section's contents. The allows
us to avoid reallocing the data as we add sections to the stash. */
@ -1918,7 +2009,7 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
stash->info_ptr += addr_size;
if (length > 0)
{
{
each = parse_comp_unit (abfd, stash, length, offset_size);
stash->info_ptr += length;

View File

@ -3837,7 +3837,7 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
= backend->debug_swap.swap_ext_in;
bfd_size_type external_ext_size = backend->debug_swap.external_ext_size;
unsigned long ext_count;
struct ecoff_link_hash_entry **sym_hash;
struct bfd_link_hash_entry **sym_hash;
char *ext_ptr;
char *ext_end;
bfd_size_type amt;
@ -3846,10 +3846,10 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
amt = ext_count;
amt *= sizeof (struct bfd_link_hash_entry *);
sym_hash = (struct ecoff_link_hash_entry **) bfd_alloc (abfd, amt);
sym_hash = (struct bfd_link_hash_entry **) bfd_alloc (abfd, amt);
if (!sym_hash)
return false;
ecoff_data (abfd)->sym_hashes = sym_hash;
ecoff_data (abfd)->sym_hashes = (struct ecoff_link_hash_entry **) sym_hash;
ext_ptr = (char *) external_ext;
ext_end = ext_ptr + ext_count * external_ext_size;
@ -3980,15 +3980,13 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
name = ssext + esym.asym.iss;
h = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, name,
(flagword) (esym.weakext ? BSF_WEAK : BSF_GLOBAL),
section, value, (const char *) NULL, true, true,
(struct bfd_link_hash_entry **) &h)))
section, value, (const char *) NULL, true, true, sym_hash)))
return false;
*sym_hash = h;
h = (struct ecoff_link_hash_entry *) *sym_hash;
/* If we are building an ECOFF hash table, save the external
symbol information. */

View File

@ -770,22 +770,6 @@ struct elf_backend_data
boolean (*elf_backend_write_section)
PARAMS ((bfd *, asection *, bfd_byte *));
/* This function, if defined, sets up the file positions for non PT_LOAD
segments, especially for segments containing non-allocated sections. */
void (*set_nonloadable_filepos)
PARAMS ((bfd *, Elf_Internal_Phdr *));
/* This function, if defined, returns true if the section is contained
within the segment. File positions are compared. */
boolean (*is_contained_by_filepos)
PARAMS ((asection *, Elf_Internal_Phdr *));
/* This function, if defined, returns true if copy_private_bfd_data
should be called. It provides a way of overriding default
test conditions in _bfd_elf_copy_private_section_data. */
boolean (*copy_private_bfd_data_p)
PARAMS ((bfd *, asection *, bfd *, asection *));
/* The level of IRIX compatibility we're striving for.
MIPS ELF specific function. */
irix_compat_t (*elf_backend_mips_irix_compat)

View File

@ -414,7 +414,7 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec,
/* 64-bit .eh_frame is not supported. */
goto free_no_table;
buf += 4;
if ((buf - ehbuf) + hdr.length > sec->_raw_size)
if ((bfd_size_type) (buf - ehbuf) + hdr.length > sec->_raw_size)
/* CIE/FDE not contained fully in this .eh_frame input section. */
goto free_no_table;

View File

@ -3960,11 +3960,6 @@ Error: First section in segment (%s) starts at 0x%x whereas the segment starts a
}
}
/* If additional nonloadable filepos adjustments are required,
do them now. */
if (bed->set_nonloadable_filepos)
(*bed->set_nonloadable_filepos) (abfd, phdrs);
/* Clear out any program headers we allocated but did not use. */
for (; count < alloc; count++, p++)
{
@ -4560,13 +4555,6 @@ copy_private_bfd_data (ibfd, obfd)
&& (section->lma + section->_raw_size \
<= SEGMENT_END (segment, base)))
/* Returns true if the given section is contained within the
given segment. Filepos addresses are compared in an elf
backend function. */
#define IS_CONTAINED_BY_FILEPOS(sec, seg, bed) \
(bed->is_contained_by_filepos \
&& (*bed->is_contained_by_filepos) (sec, seg))
/* Special case: corefile "NOTE" section containing regs, prpsinfo etc. */
#define IS_COREFILE_NOTE(p, s) \
(p->p_type == PT_NOTE \
@ -4602,9 +4590,7 @@ copy_private_bfd_data (ibfd, obfd)
? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \
: IS_CONTAINED_BY_VMA (section, segment)) \
&& (section->flags & SEC_ALLOC) != 0) \
|| IS_COREFILE_NOTE (segment, section) \
|| (IS_CONTAINED_BY_FILEPOS (section, segment, bed) \
&& (section->flags & SEC_ALLOC) == 0)) \
|| IS_COREFILE_NOTE (segment, section)) \
&& section->output_section != NULL \
&& ! section->segment_mark)
@ -4849,7 +4835,6 @@ copy_private_bfd_data (ibfd, obfd)
/* Match up the physical address of the segment with the
LMA address of the output section. */
if (IS_CONTAINED_BY_LMA (output_section, segment, map->p_paddr)
|| IS_CONTAINED_BY_FILEPOS (section, segment, bed)
|| IS_COREFILE_NOTE (segment, section)
|| (bed->want_p_paddr_set_to_zero &&
IS_CONTAINED_BY_VMA (output_section, segment))
@ -5086,7 +5071,6 @@ copy_private_bfd_data (ibfd, obfd)
#undef SEGMENT_END
#undef IS_CONTAINED_BY_VMA
#undef IS_CONTAINED_BY_LMA
#undef IS_CONTAINED_BY_FILEPOS
#undef IS_COREFILE_NOTE
#undef IS_SOLARIS_PT_INTERP
#undef INCLUDE_SECTION_IN_SEGMENT
@ -5106,26 +5090,12 @@ _bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec)
asection *osec;
{
Elf_Internal_Shdr *ihdr, *ohdr;
const struct elf_backend_data *bed = get_elf_backend_data (ibfd);
if (ibfd->xvec->flavour != bfd_target_elf_flavour
|| obfd->xvec->flavour != bfd_target_elf_flavour)
return true;
/* Copy over private BFD data if it has not already been copied.
This must be done here, rather than in the copy_private_bfd_data
entry point, because the latter is called after the section
contents have been set, which means that the program headers have
already been worked out. The backend function provides a way to
override the test conditions and code path for the call to
copy_private_bfd_data. */
if (bed->copy_private_bfd_data_p)
{
if ((*bed->copy_private_bfd_data_p) (ibfd, isec, obfd, osec))
if (! copy_private_bfd_data (ibfd, obfd))
return false;
}
else if (elf_tdata (obfd)->segment_map == NULL && elf_tdata (ibfd)->phdr != NULL)
if (elf_tdata (obfd)->segment_map == NULL && elf_tdata (ibfd)->phdr != NULL)
{
asection *s;

View File

@ -423,6 +423,7 @@ record_arm_to_thumb_glue (link_info, h)
asection * s;
char * tmp_name;
struct elf_link_hash_entry * myh;
struct bfd_link_hash_entry * bh;
struct elf32_arm_link_hash_table * globals;
bfd_vma val;
@ -456,11 +457,11 @@ record_arm_to_thumb_glue (link_info, h)
/* The only trick here is using hash_table->arm_glue_size as the value. Even
though the section isn't allocated yet, this is where we will be putting
it. */
bh = NULL;
val = globals->arm_glue_size + 1;
_bfd_generic_link_add_one_symbol (link_info, globals->bfd_of_glue_owner,
tmp_name, BSF_GLOBAL, s, val,
NULL, true, false,
(struct bfd_link_hash_entry **) &myh);
NULL, true, false, &bh);
free (tmp_name);
@ -478,6 +479,7 @@ record_thumb_to_arm_glue (link_info, h)
asection *s;
char *tmp_name;
struct elf_link_hash_entry *myh;
struct bfd_link_hash_entry *bh;
struct elf32_arm_link_hash_table *hash_table;
char bind;
bfd_vma val;
@ -509,13 +511,14 @@ record_thumb_to_arm_glue (link_info, h)
return;
}
bh = NULL;
val = hash_table->thumb_glue_size + 1;
_bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner,
tmp_name, BSF_GLOBAL, s, val,
NULL, true, false,
(struct bfd_link_hash_entry **) &myh);
NULL, true, false, &bh);
/* If we mark it 'Thumb', the disassembler will do a better job. */
myh = (struct elf_link_hash_entry *) bh;
bind = ELF_ST_BIND (myh->type);
myh->type = ELF_ST_INFO (bind, STT_ARM_TFUNC);
@ -532,13 +535,11 @@ record_thumb_to_arm_glue (link_info, h)
sprintf (tmp_name, CHANGE_TO_ARM, name);
myh = NULL;
bh = NULL;
val = hash_table->thumb_glue_size + 4,
_bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner,
tmp_name, BSF_LOCAL, s, val,
NULL, true, false,
(struct bfd_link_hash_entry **) &myh);
NULL, true, false, &bh);
free (tmp_name);

View File

@ -2616,36 +2616,40 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
BFD_ASSERT (rel->r_offset >= 1);
val = bfd_get_8 (input_bfd, contents + rel->r_offset - 1);
BFD_ASSERT (rel->r_offset + 4 <= input_section->_raw_size);
if (val != 0xa1)
{
BFD_ASSERT (rel->r_offset >= 2);
type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
}
if (val == 0xa1)
{
/* movl foo, %eax. */
bfd_put_8 (output_bfd, 0xb8, contents + rel->r_offset - 2);
}
else if (type == 0x8b)
{
/* movl */
BFD_ASSERT ((val & 0xc7) == 0x05);
bfd_put_8 (output_bfd, 0xc7,
contents + rel->r_offset - 2);
bfd_put_8 (output_bfd, 0xc0 | ((val >> 3) & 7),
contents + rel->r_offset - 1);
}
else if (type == 0x03)
{
/* addl */
BFD_ASSERT ((val & 0xc7) == 0x05);
bfd_put_8 (output_bfd, 0x81,
contents + rel->r_offset - 2);
bfd_put_8 (output_bfd, 0xc0 | ((val >> 3) & 7),
contents + rel->r_offset - 1);
bfd_put_8 (output_bfd, 0xb8, contents + rel->r_offset - 1);
}
else
BFD_FAIL ();
{
BFD_ASSERT (rel->r_offset >= 2);
type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
switch (type)
{
case 0x8b:
/* movl */
BFD_ASSERT ((val & 0xc7) == 0x05);
bfd_put_8 (output_bfd, 0xc7,
contents + rel->r_offset - 2);
bfd_put_8 (output_bfd,
0xc0 | ((val >> 3) & 7),
contents + rel->r_offset - 1);
break;
case 0x03:
/* addl */
BFD_ASSERT ((val & 0xc7) == 0x05);
bfd_put_8 (output_bfd, 0x81,
contents + rel->r_offset - 2);
bfd_put_8 (output_bfd,
0xc0 | ((val >> 3) & 7),
contents + rel->r_offset - 1);
break;
default:
BFD_FAIL ();
break;
}
}
bfd_put_32 (output_bfd, -tpoff (info, relocation),
contents + rel->r_offset);
continue;
@ -3384,6 +3388,4 @@ elf_i386_finish_dynamic_sections (output_bfd, info)
#define elf_backend_relocate_section elf_i386_relocate_section
#define elf_backend_size_dynamic_sections elf_i386_size_dynamic_sections
#ifndef ELF32_I386_C_INCLUDED
#include "elf32-target.h"
#endif

View File

@ -40,12 +40,13 @@ static boolean create_got_section
static boolean elf_s390_create_dynamic_sections
PARAMS((bfd *, struct bfd_link_info *));
static void elf_s390_copy_indirect_symbol
PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
static boolean elf_s390_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
static asection *elf_s390_gc_mark_hook
PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
struct elf_link_hash_entry *, Elf_Internal_Sym *));
static boolean elf_s390_gc_sweep_hook
PARAMS ((bfd *, struct bfd_link_info *, asection *,
@ -478,13 +479,13 @@ elf_s390_link_hash_table_create (abfd)
struct elf_s390_link_hash_table *ret;
bfd_size_type amt = sizeof (struct elf_s390_link_hash_table);
ret = (struct elf_s390_link_hash_table *) bfd_alloc (abfd, amt);
ret = (struct elf_s390_link_hash_table *) bfd_malloc (amt);
if (ret == NULL)
return NULL;
if (! _bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc))
{
bfd_release (abfd, ret);
free (ret);
return NULL;
}
@ -564,7 +565,8 @@ elf_s390_create_dynamic_sections (dynobj, info)
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
elf_s390_copy_indirect_symbol (dir, ind)
elf_s390_copy_indirect_symbol (bed, dir, ind)
struct elf_backend_data *bed;
struct elf_link_hash_entry *dir, *ind;
{
struct elf_s390_link_hash_entry *edir, *eind;
@ -606,7 +608,7 @@ elf_s390_copy_indirect_symbol (dir, ind)
eind->dyn_relocs = NULL;
}
_bfd_elf_link_hash_copy_indirect (dir, ind);
_bfd_elf_link_hash_copy_indirect (bed, dir, ind);
}
/* Look through the relocs for a section during the first phase, and
@ -903,8 +905,8 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
relocation. */
static asection *
elf_s390_gc_mark_hook (abfd, info, rel, h, sym)
bfd *abfd;
elf_s390_gc_mark_hook (sec, info, rel, h, sym)
asection *sec;
struct bfd_link_info *info ATTRIBUTE_UNUSED;
Elf_Internal_Rela *rel;
struct elf_link_hash_entry *h;
@ -934,9 +936,7 @@ elf_s390_gc_mark_hook (abfd, info, rel, h, sym)
}
}
else
{
return bfd_section_from_elf_index (abfd, sym->st_shndx);
}
return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
return NULL;
}
@ -1064,7 +1064,7 @@ elf_s390_adjust_dynamic_symbol (info, h)
/* If this is a function, put it in the procedure linkage table. We
will fill in the contents of the procedure linkage table later
(although we could actually do it here). */
(although we could actually do it here). */
if (h->type == STT_FUNC
|| (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
{
@ -1973,9 +1973,11 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
break;
}
/* Dynamic relocs are not propagated for SEC_DEBUGGING sections
because such sections are not SEC_ALLOC and thus ld.so will
not process them. */
if (unresolved_reloc
&& !(info->shared
&& (input_section->flags & SEC_DEBUGGING) != 0
&& !((input_section->flags & SEC_DEBUGGING) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
(*_bfd_error_handler)
(_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),

File diff suppressed because it is too large Load Diff

View File

@ -1298,7 +1298,6 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
off &= ~1;
else
{
bfd_put_32 (output_bfd, relocation, sgot->contents + off);
if (info->shared)
{
@ -1314,7 +1313,8 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
+ sgot->output_offset
+ off);
outrel.r_info = ELF32_R_INFO (0, R_SPARC_RELATIVE);
outrel.r_addend = 0;
outrel.r_addend = relocation;
relocation = 0;
bfd_elf32_swap_reloca_out (output_bfd, &outrel,
(((Elf32_External_Rela *)
srelgot->contents)
@ -1322,6 +1322,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
++srelgot->reloc_count;
}
bfd_put_32 (output_bfd, relocation, sgot->contents + off);
local_got_offsets[r_symndx] |= 1;
}
}
@ -1827,14 +1828,21 @@ elf32_sparc_finish_dynamic_symbol (output_bfd, info, h, sym)
if (info->shared
&& (info->symbolic || h->dynindx == -1)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
rela.r_info = ELF32_R_INFO (0, R_SPARC_RELATIVE);
{
asection *sec = h->root.u.def.section;
rela.r_info = ELF32_R_INFO (0, R_SPARC_RELATIVE);
rela.r_addend = (h->root.u.def.value
+ sec->output_section->vma
+ sec->output_offset);
}
else
{
bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
rela.r_info = ELF32_R_INFO (h->dynindx, R_SPARC_GLOB_DAT);
rela.r_addend = 0;
}
rela.r_addend = 0;
bfd_put_32 (output_bfd, (bfd_vma) 0,
sgot->contents + (h->got.offset &~ (bfd_vma) 1));
bfd_elf32_swap_reloca_out (output_bfd, &rela,
((Elf32_External_Rela *) srela->contents
+ srela->reloc_count));

View File

@ -1,5 +1,5 @@
/* V850-specific support for 32-bit ELF
Copyright 1996, 1997, 1998, 1999, 2000, 2001
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -79,12 +79,12 @@ static boolean v850_elf_link_output_symbol_hook
PARAMS ((bfd *, struct bfd_link_info *, const char *,
Elf_Internal_Sym *, asection *));
static boolean v850_elf_section_from_shdr
PARAMS ((bfd *, Elf_Internal_Shdr *, char *));
PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
static boolean v850_elf_gc_sweep_hook
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
static asection * v850_elf_gc_mark_hook
PARAMS ((bfd *, struct bfd_link_info *,
PARAMS ((asection *, struct bfd_link_info *,
Elf_Internal_Rela *, struct elf_link_hash_entry *,
Elf_Internal_Sym *));
@ -1322,7 +1322,7 @@ v850_elf_reloc (abfd, reloc, symbol, data, isection, obfd, err)
nop
foo:
nop */
if (reloc->howto->pc_relative == true)
if (reloc->howto->pc_relative)
{
/* Here the variable relocation holds the final address of the
symbol we are relocating against, plus any addend. */
@ -1740,8 +1740,8 @@ v850_elf_gc_sweep_hook (abfd, info, sec, relocs)
}
static asection *
v850_elf_gc_mark_hook (abfd, info, rel, h, sym)
bfd *abfd;
v850_elf_gc_mark_hook (sec, info, rel, h, sym)
asection *sec;
struct bfd_link_info *info ATTRIBUTE_UNUSED;
Elf_Internal_Rela *rel;
struct elf_link_hash_entry *h;
@ -1771,9 +1771,7 @@ v850_elf_gc_mark_hook (abfd, info, rel, h, sym)
}
}
else
{
return bfd_section_from_elf_index (abfd, sym->st_shndx);
}
return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
return NULL;
}
@ -2135,7 +2133,7 @@ static boolean
v850_elf_section_from_shdr (abfd, hdr, name)
bfd * abfd;
Elf_Internal_Shdr * hdr;
char * name;
const char * name;
{
/* There ought to be a place to keep ELF backend specific flags, but
at the moment there isn't one. We just keep track of the

View File

@ -2480,6 +2480,7 @@ elf64_alpha_create_dynamic_sections (abfd, info)
{
asection *s;
struct elf_link_hash_entry *h;
struct bfd_link_hash_entry *bh;
/* We need to create .plt, .rela.plt, .got, and .rela.got sections. */
@ -2495,13 +2496,13 @@ elf64_alpha_create_dynamic_sections (abfd, info)
/* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the
.plt section. */
h = NULL;
bh = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s,
(bfd_vma) 0, (const char *) NULL, false,
get_elf_backend_data (abfd)->collect,
(struct bfd_link_hash_entry **) &h)))
get_elf_backend_data (abfd)->collect, &bh)))
return false;
h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@ -2539,13 +2540,13 @@ elf64_alpha_create_dynamic_sections (abfd, info)
dynobj's .got section. We don't do this in the linker script
because we don't want to define the symbol if we are not creating
a global offset table. */
h = NULL;
bh = NULL;
if (!(_bfd_generic_link_add_one_symbol
(info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL,
alpha_elf_tdata(abfd)->got, (bfd_vma) 0, (const char *) NULL,
false, get_elf_backend_data (abfd)->collect,
(struct bfd_link_hash_entry **) &h)))
false, get_elf_backend_data (abfd)->collect, &bh)))
return false;
h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@ -3099,7 +3100,7 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
case R_ALPHA_REFLONG:
case R_ALPHA_REFQUAD:
if (info->shared || maybe_dynamic)
if ((info->shared && (sec->flags & SEC_ALLOC)) || maybe_dynamic)
need = NEED_DYNREL;
break;
@ -4576,7 +4577,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
case STO_ALPHA_NOPV:
break;
case STO_ALPHA_STD_GPLOAD:
addend += 8;
value += 8;
break;
default:
if (h != NULL)

View File

@ -1661,6 +1661,7 @@ ppc64_elf_merge_private_bfd_data (ibfd, obfd)
{
/* Check if we have the same endianess. */
if (ibfd->xvec->byteorder != obfd->xvec->byteorder
&& ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN
&& obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
{
const char *msg;
@ -1788,19 +1789,19 @@ struct ppc_dyn_relocs
ppc_stub_plt_branch:
Similar to the above, but a 24 bit branch in the stub section won't
reach its destination.
. addis %r12,%r2,xxx@ha
. ld %r11,xxx@l(%r12)
. addis %r12,%r2,xxx@toc@ha
. ld %r11,xxx@toc@l(%r12)
. mtctr %r11
. bctr
ppc_stub_plt_call:
Used to call a function in a shared library.
. addis %r12,%r2,xxx@ha
. addis %r12,%r2,xxx@toc@ha
. std %r2,40(%r1)
. ld %r11,xxx+0@l(%r12)
. ld %r2,xxx+8@l(%r12)
. ld %r11,xxx+0@toc@l(%r12)
. ld %r2,xxx+8@toc@l(%r12)
. mtctr %r11
. ld %r11,xxx+16@l(%r12)
. ld %r11,xxx+16@toc@l(%r12)
. bctr
*/
@ -3169,6 +3170,7 @@ func_desc_adjust (h, inf)
{
bfd *abfd;
asymbol *newsym;
struct bfd_link_hash_entry *bh;
abfd = h->root.u.undef.abfd;
newsym = bfd_make_empty_symbol (abfd);
@ -3179,13 +3181,14 @@ func_desc_adjust (h, inf)
if (h->root.type == bfd_link_hash_undefweak)
newsym->flags |= BSF_WEAK;
bh = &fdh->root;
if ( !(_bfd_generic_link_add_one_symbol
(info, abfd, newsym->name, newsym->flags,
newsym->section, newsym->value, NULL, false, false,
(struct bfd_link_hash_entry **) &fdh)))
newsym->section, newsym->value, NULL, false, false, &bh)))
{
return false;
}
fdh = (struct elf_link_hash_entry *) bh;
fdh->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
}
@ -3805,8 +3808,7 @@ edit_opd (obfd, info)
for the function descriptor sym which we
don't have at the moment. So keep an
array of adjustments. */
adjust[(rel->r_offset + wptr - rptr) / 24]
= wptr - rptr;
adjust[rel->r_offset / 24] = wptr - rptr;
}
if (wptr != rptr)

View File

@ -40,12 +40,13 @@ static boolean create_got_section
static boolean elf_s390_create_dynamic_sections
PARAMS((bfd *, struct bfd_link_info *));
static void elf_s390_copy_indirect_symbol
PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
static boolean elf_s390_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
static asection *elf_s390_gc_mark_hook
PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
struct elf_link_hash_entry *, Elf_Internal_Sym *));
static boolean elf_s390_gc_sweep_hook
PARAMS ((bfd *, struct bfd_link_info *, asection *,
@ -424,13 +425,13 @@ elf_s390_link_hash_table_create (abfd)
struct elf_s390_link_hash_table *ret;
bfd_size_type amt = sizeof (struct elf_s390_link_hash_table);
ret = (struct elf_s390_link_hash_table *) bfd_alloc (abfd, amt);
ret = (struct elf_s390_link_hash_table *) bfd_malloc (amt);
if (ret == NULL)
return NULL;
if (! _bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc))
{
bfd_release (abfd, ret);
free (ret);
return NULL;
}
@ -471,7 +472,7 @@ create_got_section (dynobj, info)
(SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
| SEC_IN_MEMORY | SEC_LINKER_CREATED
| SEC_READONLY))
|| ! bfd_set_section_alignment (dynobj, htab->srelgot, 2))
|| ! bfd_set_section_alignment (dynobj, htab->srelgot, 3))
return false;
return true;
}
@ -510,7 +511,8 @@ elf_s390_create_dynamic_sections (dynobj, info)
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
elf_s390_copy_indirect_symbol (dir, ind)
elf_s390_copy_indirect_symbol (bed, dir, ind)
struct elf_backend_data *bed;
struct elf_link_hash_entry *dir, *ind;
{
struct elf_s390_link_hash_entry *edir, *eind;
@ -552,7 +554,7 @@ elf_s390_copy_indirect_symbol (dir, ind)
eind->dyn_relocs = NULL;
}
_bfd_elf_link_hash_copy_indirect (dir, ind);
_bfd_elf_link_hash_copy_indirect (bed, dir, ind);
}
/* Look through the relocs for a section during the first phase, and
@ -776,7 +778,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
flags |= SEC_ALLOC | SEC_LOAD;
if (sreloc == NULL
|| ! bfd_set_section_flags (dynobj, sreloc, flags)
|| ! bfd_set_section_alignment (dynobj, sreloc, 2))
|| ! bfd_set_section_alignment (dynobj, sreloc, 3))
return false;
}
elf_section_data (sec)->sreloc = sreloc;
@ -855,8 +857,8 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
relocation. */
static asection *
elf_s390_gc_mark_hook (abfd, info, rel, h, sym)
bfd *abfd;
elf_s390_gc_mark_hook (sec, info, rel, h, sym)
asection *sec;
struct bfd_link_info *info ATTRIBUTE_UNUSED;
Elf_Internal_Rela *rel;
struct elf_link_hash_entry *h;
@ -886,9 +888,7 @@ elf_s390_gc_mark_hook (abfd, info, rel, h, sym)
}
}
else
{
return bfd_section_from_elf_index (abfd, sym->st_shndx);
}
return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
return NULL;
}
@ -1019,7 +1019,7 @@ elf_s390_adjust_dynamic_symbol (info, h)
/* If this is a function, put it in the procedure linkage table. We
will fill in the contents of the procedure linkage table later
(although we could actually do it here). */
(although we could actually do it here). */
if (h->type == STT_FUNC
|| (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
{
@ -1937,9 +1937,11 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
break;
}
/* Dynamic relocs are not propagated for SEC_DEBUGGING sections
because such sections are not SEC_ALLOC and thus ld.so will
not process them. */
if (unresolved_reloc
&& !(info->shared
&& (input_section->flags & SEC_DEBUGGING) != 0
&& !((input_section->flags & SEC_DEBUGGING) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
(*_bfd_error_handler)
(_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
@ -2339,6 +2341,7 @@ const struct elf_size_info s390_elf64_size_info =
bfd_elf64_write_out_phdrs,
bfd_elf64_write_shdrs_and_ehdr,
bfd_elf64_write_relocs,
bfd_elf64_swap_symbol_in,
bfd_elf64_swap_symbol_out,
bfd_elf64_slurp_reloc_table,
bfd_elf64_slurp_symbol_table,

View File

@ -1563,6 +1563,9 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
if (s->_raw_size == 0)
s->_raw_size = PLT_HEADER_SIZE;
/* To simplify matters later, just store the plt index here. */
h->plt.offset = s->_raw_size / PLT_ENTRY_SIZE;
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
location in the .plt. This is required to make function
@ -1572,12 +1575,9 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
{
h->root.u.def.section = s;
h->root.u.def.value = s->_raw_size;
h->root.u.def.value = sparc64_elf_plt_entry_offset (h->plt.offset);
}
/* To simplify matters later, just store the plt index here. */
h->plt.offset = s->_raw_size / PLT_ENTRY_SIZE;
/* Make room for this entry. */
s->_raw_size += PLT_ENTRY_SIZE;
@ -2181,11 +2181,9 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
outrel.r_addend = relocation + rel->r_addend;
if (r_type == R_SPARC_64)
{
outrel.r_info = ELF64_R_INFO (0, R_SPARC_RELATIVE);
outrel.r_addend = relocation + rel->r_addend;
}
outrel.r_info = ELF64_R_INFO (0, R_SPARC_RELATIVE);
else
{
long indx;
@ -2215,6 +2213,13 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
osec = sec->output_section;
indx = elf_section_data (osec)->dynindx;
/* We are turning this relocation into one
against a section symbol, so subtract out
the output section's address but not the
offset of the input section in the output
section. */
outrel.r_addend -= osec->vma;
/* FIXME: we really should be able to link non-pic
shared libraries. */
if (indx == 0)
@ -2233,7 +2238,6 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
ELF64_R_TYPE_INFO (
ELF64_R_TYPE_DATA (rel->r_info),
r_type));
outrel.r_addend = relocation + rel->r_addend;
}
}

View File

@ -33,6 +33,7 @@ _bfd_elf_create_got_section (abfd, info)
flagword flags;
register asection *s;
struct elf_link_hash_entry *h;
struct bfd_link_hash_entry *bh;
struct elf_backend_data *bed = get_elf_backend_data (abfd);
int ptralign;
@ -79,12 +80,13 @@ _bfd_elf_create_got_section (abfd, info)
(or .got.plt) section. We don't do this in the linker script
because we don't want to define the symbol if we are not creating
a global offset table. */
h = NULL;
bh = NULL;
if (!(_bfd_generic_link_add_one_symbol
(info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
bed->got_symbol_offset, (const char *) NULL, false,
bed->collect, (struct bfd_link_hash_entry **) &h)))
bed->collect, &bh)))
return false;
h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@ -151,13 +153,15 @@ _bfd_elf_create_dynamic_sections (abfd, info)
{
/* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the
.plt section. */
struct elf_link_hash_entry *h = NULL;
struct elf_link_hash_entry *h;
struct bfd_link_hash_entry *bh = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s,
(bfd_vma) 0, (const char *) NULL, false,
get_elf_backend_data (abfd)->collect,
(struct bfd_link_hash_entry **) &h)))
get_elf_backend_data (abfd)->collect, &bh)))
return false;
h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@ -546,29 +550,27 @@ _bfd_elf_create_linker_section (abfd, info, which, defaults)
if (lsect->sym_name)
{
struct elf_link_hash_entry *h = NULL;
struct elf_link_hash_entry *h;
struct bfd_link_hash_entry *bh;
#ifdef DEBUG
fprintf (stderr, "Adding %s to section %s\n",
lsect->sym_name,
lsect->name);
#endif
h = (struct elf_link_hash_entry *)
bfd_link_hash_lookup (info->hash, lsect->sym_name, false, false, false);
bh = bfd_link_hash_lookup (info->hash, lsect->sym_name,
false, false, false);
if ((h == NULL || h->root.type == bfd_link_hash_undefined)
&& !(_bfd_generic_link_add_one_symbol (info,
abfd,
lsect->sym_name,
BSF_GLOBAL,
s,
((lsect->hole_size)
? s->_raw_size - lsect->hole_size + lsect->sym_offset
: lsect->sym_offset),
(const char *) NULL,
false,
get_elf_backend_data (abfd)->collect,
(struct bfd_link_hash_entry **) &h)))
return (elf_linker_section_t *)0;
if ((bh == NULL || bh->type == bfd_link_hash_undefined)
&& !(_bfd_generic_link_add_one_symbol
(info, abfd, lsect->sym_name, BSF_GLOBAL, s,
(lsect->hole_size
? s->_raw_size - lsect->hole_size + lsect->sym_offset
: lsect->sym_offset),
(const char *) NULL, false,
get_elf_backend_data (abfd)->collect, &bh)))
return (elf_linker_section_t *) 0;
h = (struct elf_link_hash_entry *) bh;
if ((defaults->which != LINKER_SECTION_SDATA)
&& (defaults->which != LINKER_SECTION_SDATA2))
@ -579,7 +581,7 @@ _bfd_elf_create_linker_section (abfd, info, which, defaults)
if (info->shared
&& ! _bfd_elf_link_record_dynamic_symbol (info, h))
return (elf_linker_section_t *)0;
return (elf_linker_section_t *) 0;
}
}

View File

@ -921,6 +921,7 @@ elf_add_default_symbol (abfd, info, h, name, sym, psec, value,
boolean size_change_ok;
char *shortname;
struct elf_link_hash_entry *hi;
struct bfd_link_hash_entry *bh;
struct elf_backend_data *bed;
boolean collect;
boolean dynamic;
@ -979,11 +980,12 @@ elf_add_default_symbol (abfd, info, h, name, sym, psec, value,
if (! override)
{
bh = &hi->root;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, shortname, BSF_INDIRECT, bfd_ind_section_ptr,
(bfd_vma) 0, name, false, collect,
(struct bfd_link_hash_entry **) &hi)))
(bfd_vma) 0, name, false, collect, &bh)))
return false;
hi = (struct elf_link_hash_entry *) bh;
}
else
{
@ -1098,11 +1100,12 @@ elf_add_default_symbol (abfd, info, h, name, sym, psec, value,
}
else
{
bh = &hi->root;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, shortname, BSF_INDIRECT,
bfd_ind_section_ptr, (bfd_vma) 0, name, false,
collect, (struct bfd_link_hash_entry **) &hi)))
bfd_ind_section_ptr, (bfd_vma) 0, name, false, collect, &bh)))
return false;
hi = (struct elf_link_hash_entry *) bh;
/* If there is a duplicate definition somewhere, then HI may not
point to an indirect symbol. We will have reported an error
@ -1295,6 +1298,14 @@ elf_link_add_object_symbols (abfd, info)
const char *name;
bfd_size_type oldsize;
bfd_size_type strindex;
struct bfd_link_needed_list *rpath = NULL, *runpath = NULL;
/* ld --just-symbols and dynamic objects don't mix very well.
Test for --just-symbols by looking at info set up by
_bfd_elf_link_just_syms. */
if ((s = abfd->sections) != NULL
&& elf_section_data (s)->sec_info_type == ELF_INFO_TYPE_JUST_SYMS)
goto error_return;
/* Find the name to use in a DT_NEEDED entry that refers to this
object. If the object has a DT_SONAME entry, we use it.
@ -1324,8 +1335,6 @@ elf_link_add_object_symbols (abfd, info)
Elf_External_Dyn *extdynend;
int elfsec;
unsigned long shlink;
int rpath;
int runpath;
dynbuf = (Elf_External_Dyn *) bfd_malloc (s->_raw_size);
if (dynbuf == NULL)
@ -1342,8 +1351,6 @@ elf_link_add_object_symbols (abfd, info)
extdyn = dynbuf;
extdynend = extdyn + s->_raw_size / sizeof (Elf_External_Dyn);
rpath = 0;
runpath = 0;
for (; extdyn < extdynend; extdyn++)
{
Elf_Internal_Dyn dyn;
@ -1387,13 +1394,6 @@ elf_link_add_object_symbols (abfd, info)
char *fnm, *anm;
unsigned int tagv = dyn.d_un.d_val;
/* When we see DT_RPATH before DT_RUNPATH, we have
to clear runpath. Do _NOT_ bfd_release, as that
frees all more recently bfd_alloc'd blocks as
well. */
if (rpath && hash_table->runpath)
hash_table->runpath = NULL;
amt = sizeof (struct bfd_link_needed_list);
n = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt);
fnm = bfd_elf_string_from_elf_section (abfd, shlink, tagv);
@ -1407,13 +1407,11 @@ elf_link_add_object_symbols (abfd, info)
n->name = anm;
n->by = abfd;
n->next = NULL;
for (pn = & hash_table->runpath;
for (pn = & runpath;
*pn != NULL;
pn = &(*pn)->next)
;
*pn = n;
runpath = 1;
rpath = 0;
}
/* Ignore DT_RPATH if we have seen DT_RUNPATH. */
if (!runpath && dyn.d_tag == DT_RPATH)
@ -1439,18 +1437,32 @@ elf_link_add_object_symbols (abfd, info)
n->name = anm;
n->by = abfd;
n->next = NULL;
for (pn = & hash_table->runpath;
for (pn = & rpath;
*pn != NULL;
pn = &(*pn)->next)
;
*pn = n;
rpath = 1;
}
}
free (dynbuf);
}
/* DT_RUNPATH overrides DT_RPATH. Do _NOT_ bfd_release, as that
frees all more recently bfd_alloc'd blocks as well. */
if (runpath)
rpath = runpath;
if (rpath)
{
struct bfd_link_needed_list **pn;
for (pn = & hash_table->runpath;
*pn != NULL;
pn = &(*pn)->next)
;
*pn = rpath;
}
/* We do not want to include any of the sections in a dynamic
object in the output file. We hack by simply clobbering the
list of sections in the BFD. This could be handled more
@ -1926,19 +1938,17 @@ elf_link_add_object_symbols (abfd, info)
might be needed here. */
if (isym->st_other != 0)
{
unsigned char hvis, symvis, other;
/* Take the balance of OTHER from the definition. */
other = (definition ? isym->st_other : h->other);
other &= ~ ELF_ST_VISIBILITY (-1);
/* Combine visibilities, using the most constraining one. */
unsigned char hvis = ELF_ST_VISIBILITY (h->other);
unsigned char symvis = ELF_ST_VISIBILITY (isym->st_other);
hvis = ELF_ST_VISIBILITY (h->other);
symvis = ELF_ST_VISIBILITY (isym->st_other);
if (symvis && (hvis > symvis || hvis == 0))
h->other = isym->st_other;
/* If neither has visibility, use the st_other of the
definition. This is an arbitrary choice, since the
other bits have no general meaning. */
if (!symvis && !hvis
&& (definition || h->other == 0))
h->other = isym->st_other;
h->other = other | (hvis > symvis ? hvis : symvis);
}
/* Set a flag in the hash table entry indicating the type of
@ -2292,6 +2302,7 @@ elf_link_create_dynamic_sections (abfd, info)
flagword flags;
register asection *s;
struct elf_link_hash_entry *h;
struct bfd_link_hash_entry *bh;
struct elf_backend_data *bed;
if (! is_elf_hash_table (info))
@ -2384,12 +2395,12 @@ elf_link_create_dynamic_sections (abfd, info)
creating a .dynamic section. We don't want to define it if there
is no .dynamic section, since on some ELF platforms the start up
code examines it to decide how to initialize the process. */
h = NULL;
bh = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, "_DYNAMIC", BSF_GLOBAL, s, (bfd_vma) 0,
(const char *) NULL, false, get_elf_backend_data (abfd)->collect,
(struct bfd_link_hash_entry **) &h)))
(const char *) 0, false, get_elf_backend_data (abfd)->collect, &bh)))
return false;
h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@ -3326,19 +3337,20 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
unsigned int cdeps;
struct bfd_elf_version_deps *n;
struct elf_link_hash_entry *h;
struct bfd_link_hash_entry *bh;
cdeps = 0;
for (n = t->deps; n != NULL; n = n->next)
++cdeps;
/* Add a symbol representing this version. */
h = NULL;
bh = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, dynobj, t->name, BSF_GLOBAL, bfd_abs_section_ptr,
(bfd_vma) 0, (const char *) NULL, false,
get_elf_backend_data (dynobj)->collect,
(struct bfd_link_hash_entry **) &h)))
get_elf_backend_data (dynobj)->collect, &bh)))
return false;
h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags &= ~ ELF_LINK_NON_ELF;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@ -3886,9 +3898,12 @@ elf_fix_symbol_flags (h, eif)
{
struct elf_link_hash_entry *weakdef;
weakdef = h->weakdef;
if (h->root.type == bfd_link_hash_indirect)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
BFD_ASSERT (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak);
weakdef = h->weakdef;
BFD_ASSERT (weakdef->root.type == bfd_link_hash_defined
|| weakdef->root.type == bfd_link_hash_defweak);
BFD_ASSERT (weakdef->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC);
@ -6335,11 +6350,10 @@ elf_link_output_extsym (h, data)
sym.st_info = ELF_ST_INFO (bindtype, ELF_ST_TYPE (sym.st_info));
}
/* If a symbol is not defined locally, we clear the visibility
field. */
/* If a symbol is not defined locally, we clear the visibility field. */
if (! finfo->info->relocateable
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
sym.st_other ^= ELF_ST_VISIBILITY (sym.st_other);
sym.st_other &= ~ ELF_ST_VISIBILITY (-1);
/* If this symbol should be put in the .dynsym section, then put it
there now. We already know the symbol index. We also fill in

View File

@ -651,13 +651,14 @@ static const bfd_byte plt_full_entry[PLT_FULL_ENTRY_SIZE] =
not support brl, and so it gets emulated by the kernel. */
#undef USE_BRL
#ifdef USE_BRL
static const bfd_byte oor_brl[16] =
{
0x05, 0x00, 0x00, 0x00, 0x01, 0x00, /* [MLX] nop.m 0 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* brl.sptk.few tgt;; */
0x00, 0x00, 0x00, 0xc0
};
#else
static const bfd_byte oor_ip[48] =
{
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, /* [MLX] nop.m 0 */
@ -670,6 +671,7 @@ static const bfd_byte oor_ip[48] =
0x60, 0x80, 0x04, 0x80, 0x03, 0x00, /* mov b6=r16 */
0x60, 0x00, 0x80, 0x00 /* br b6;; */
};
#endif
/* These functions do relaxation for IA-64 ELF.
@ -1271,6 +1273,7 @@ elfNN_ia64_aix_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
{
struct elf_backend_data *bed;
struct elfNN_ia64_link_hash_table *ia64_info;
struct bfd_link_hash_entry *bh = NULL;
bed = get_elf_backend_data (abfd);
ia64_info = elfNN_ia64_hash_table (info);
@ -1279,9 +1282,10 @@ elfNN_ia64_aix_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
(info, abfd, *namep, BSF_GLOBAL,
bfd_get_section_by_name (abfd, ".bss"),
bed->got_symbol_offset, (const char *) NULL, false,
bed->collect, (struct bfd_link_hash_entry **) &h)))
bed->collect, &bh)))
return false;
h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;

View File

@ -385,15 +385,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef elf_backend_write_section
#define elf_backend_write_section NULL
#endif
#ifndef elf_backend_set_nonloadable_filepos
#define elf_backend_set_nonloadable_filepos NULL
#endif
#ifndef elf_backend_is_contained_by_filepos
#define elf_backend_is_contained_by_filepos NULL
#endif
#ifndef elf_backend_copy_private_bfd_data_p
#define elf_backend_copy_private_bfd_data_p NULL
#endif
#ifndef elf_backend_mips_irix_compat
#define elf_backend_mips_irix_compat NULL
#endif
@ -495,9 +486,6 @@ static const struct elf_backend_data elfNN_bed =
elf_backend_discard_info,
elf_backend_ignore_discarded_relocs,
elf_backend_write_section,
elf_backend_set_nonloadable_filepos,
elf_backend_is_contained_by_filepos,
elf_backend_copy_private_bfd_data_p,
elf_backend_mips_irix_compat,
elf_backend_mips_rtype_to_howto,
elf_backend_ecoff_debug_swap,

View File

@ -132,7 +132,7 @@ bfd_check_format_matches (abfd, format, matching)
}
if (abfd->format != bfd_unknown)
return abfd->format == format;
return (boolean) (abfd->format == format);
/* Since the target type was defaulted, check them
all in the hope that one will be uniquely recognized. */
@ -355,7 +355,7 @@ bfd_set_format (abfd, format)
}
if (abfd->format != bfd_unknown)
return abfd->format == format;
return (boolean) (abfd->format == format);
/* Presume the answer is yes. */
abfd->format = format;

View File

@ -21,6 +21,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "/usr/include/a.out.h"
#include <stdio.h>
#ifndef _
#define _(X) X
#endif
int
main (argc, argv)
int argc; char** argv;

View File

@ -186,9 +186,9 @@ bfd_realloc (ptr, size)
}
if (ptr == NULL)
ret = malloc ((size_t) size);
ret = (PTR) malloc ((size_t) size);
else
ret = realloc (ptr, (size_t) size);
ret = (PTR) realloc (ptr, (size_t) size);
if (ret == NULL && (size_t) size != 0)
bfd_set_error (bfd_error_no_memory);
@ -562,7 +562,7 @@ bfd_bwrite (ptr, size, abfd)
newsize = (bim->size + 127) & ~(bfd_size_type) 127;
if (newsize > oldsize)
{
bim->buffer = bfd_realloc (bim->buffer, newsize);
bim->buffer = (bfd_byte *) bfd_realloc (bim->buffer, newsize);
if (bim->buffer == 0)
{
bim->size = 0;
@ -608,7 +608,7 @@ bfd_write_bigendian_4byte_int (abfd, i)
{
bfd_byte buffer[4];
bfd_putb32 ((bfd_vma) i, buffer);
return bfd_bwrite ((PTR) buffer, (bfd_size_type) 4, abfd) == 4;
return (boolean) (bfd_bwrite ((PTR) buffer, (bfd_size_type) 4, abfd) == 4);
}
bfd_vma
@ -706,7 +706,7 @@ bfd_seek (abfd, position, direction)
newsize = (bim->size + 127) & ~(bfd_size_type) 127;
if (newsize > oldsize)
{
bim->buffer = bfd_realloc (bim->buffer, newsize);
bim->buffer = (bfd_byte *) bfd_realloc (bim->buffer, newsize);
if (bim->buffer == 0)
{
bim->size = 0;
@ -1414,7 +1414,7 @@ bfd_generic_is_local_label_name (abfd, name)
{
char locals_prefix = (bfd_get_symbol_leading_char (abfd) == '_') ? 'L' : '.';
return (name[0] == locals_prefix);
return (boolean) (name[0] == locals_prefix);
}
/* Can be used from / for bfd_merge_private_bfd_data to check that

View File

@ -784,7 +784,7 @@ typedef struct
struct coff_link_hash_entry *, struct internal_syment *,
bfd_vma *));
boolean (*_bfd_coff_adjust_symndx)\
boolean (*_bfd_coff_adjust_symndx)
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
struct internal_reloc *, boolean *));

View File

@ -449,7 +449,8 @@ _bfd_link_hash_newfunc (entry, table, string)
subclass. */
if (entry == NULL)
{
entry = bfd_hash_allocate (table, sizeof (struct bfd_link_hash_entry));
entry = (struct bfd_hash_entry *)
bfd_hash_allocate (table, sizeof (struct bfd_link_hash_entry));
if (entry == NULL)
return entry;
}
@ -645,8 +646,8 @@ _bfd_generic_link_hash_newfunc (entry, table, string)
subclass. */
if (entry == NULL)
{
entry = bfd_hash_allocate (table,
sizeof (struct generic_link_hash_entry));
entry = (struct bfd_hash_entry *)
bfd_hash_allocate (table, sizeof (struct generic_link_hash_entry));
if (entry == NULL)
return entry;
}
@ -1305,6 +1306,7 @@ generic_link_add_symbol_list (abfd, info, symbol_count, symbols, collect)
const char *name;
const char *string;
struct generic_link_hash_entry *h;
struct bfd_link_hash_entry *bh;
name = bfd_asymbol_name (p);
if (((p->flags & BSF_INDIRECT) != 0
@ -1326,12 +1328,12 @@ generic_link_add_symbol_list (abfd, info, symbol_count, symbols, collect)
else
string = NULL;
h = NULL;
bh = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, name, p->flags, bfd_get_section (p),
p->value, string, false, collect,
(struct bfd_link_hash_entry **) &h)))
p->value, string, false, collect, &bh)))
return false;
h = (struct generic_link_hash_entry *) bh;
/* If this is a constructor symbol, and the linker didn't do
anything with it, then we want to just pass the symbol
@ -2018,7 +2020,7 @@ _bfd_generic_final_link (abfd, info)
for (o = abfd->sections; o != NULL; o = o->next)
for (p = o->link_order_head; p != NULL; p = p->next)
if (p->type == bfd_indirect_link_order)
p->u.indirect.section->linker_mark = true;
p->u.indirect.section->linker_mark = (unsigned int) true;
/* Build the output symbol table. */
for (sub = info->input_bfds; sub != (bfd *) NULL; sub = sub->link_next)

View File

@ -353,7 +353,7 @@ sec_merge_emit (abfd, entry)
if (alignment_power)
free (pad);
return entry == NULL || entry->secinfo != secinfo;
return (boolean) (entry == NULL || entry->secinfo != secinfo);
}
/* This function is called for each input file from the add_symbols
@ -667,7 +667,7 @@ merge_strings (sinfo)
break;
if (e->len > 4 * e->u.entsize)
{
s = e->root.string + e->len - e->u.entsize;
s = (const unsigned char *) (e->root.string + e->len - e->u.entsize);
hash = 0;
for (i = 0; i < 4 * e->u.entsize; i++)
{
@ -690,7 +690,7 @@ merge_strings (sinfo)
else
*p = (PTR) e;
}
s = e->root.string + e->len - e->u.entsize;
s = (const unsigned char *) (e->root.string + e->len - e->u.entsize);
hash = 0;
for (i = 0; i < e->u.entsize; i++)
{

View File

@ -1,5 +1,5 @@
/* Support for the generic parts of PE/PEI, for BFD.
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Cygnus Solutions.
@ -312,7 +312,7 @@ pe_mkobject_hook (abfd, filehdr, aouthdr)
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
pe_data_type *pe;
if (pe_mkobject (abfd) == false)
if (! pe_mkobject (abfd))
return NULL;
pe = pe_data (abfd);
@ -1207,7 +1207,10 @@ _("%s: Recognised but unhandled machine type (0x%x) in Import Library Format arc
return NULL;
if (bfd_bread (ptr, size, abfd) != size)
return NULL;
{
bfd_release (abfd, ptr);
return NULL;
}
symbol_name = ptr;
source_dll = ptr + strlen (ptr) + 1;
@ -1219,14 +1222,17 @@ _("%s: Recognised but unhandled machine type (0x%x) in Import Library Format arc
(_("%s: string not null terminated in ILF object file."),
bfd_archive_filename (abfd));
bfd_set_error (bfd_error_malformed_archive);
bfd_release (abfd, ptr);
return NULL;
}
/* Now construct the bfd. */
if (! pe_ILF_build_a_bfd (abfd, magic, symbol_name,
source_dll, ordinal, types))
return NULL;
{
bfd_release (abfd, ptr);
return NULL;
}
return abfd->xvec;
}

View File

@ -134,6 +134,7 @@ elf32-h8300.c
elf32-hppa.c
elf32-hppa.h
elf32-i370.c
elf32-i386-fbsd.c
elf32-i386.c
elf32-i386qnx.c
elf32-i860.c
@ -161,6 +162,7 @@ elf32-v850.c
elf32-vax.c
elf32-xstormy16.c
elf32.c
elf64-alpha-fbsd.c
elf64-alpha.c
elf64-gen.c
elf64-hppa.c

File diff suppressed because it is too large Load Diff

View File

@ -3574,7 +3574,7 @@ const char *
bfd_get_reloc_code_name (code)
bfd_reloc_code_real_type code;
{
if (code > BFD_RELOC_UNUSED)
if ((int) code > (int) BFD_RELOC_UNUSED)
return 0;
return bfd_reloc_code_real_names[(int)code];
}
@ -3702,7 +3702,7 @@ bfd_generic_get_relocated_section_contents (abfd, link_info, link_order, data,
/* We're not relaxing the section, so just copy the size info. */
input_section->_cooked_size = input_section->_raw_size;
input_section->reloc_done = true;
input_section->reloc_done = (unsigned int) true;
reloc_count = bfd_canonicalize_reloc (input_bfd,
input_section,

View File

@ -643,7 +643,8 @@ bfd_section_hash_newfunc (entry, table, string)
subclass. */
if (entry == NULL)
{
entry = bfd_hash_allocate (table, sizeof (struct section_hash_entry));
entry = (struct bfd_hash_entry *)
bfd_hash_allocate (table, sizeof (struct section_hash_entry));
if (entry == NULL)
return entry;
}
@ -1186,7 +1187,7 @@ bfd_set_section_contents (abfd, section, location, offset, count)
/* Record a copy of the data in memory if desired. */
if (section->contents
&& location != section->contents + offset)
&& location != (PTR) (section->contents + offset))
memcpy (section->contents + offset, location, (size_t) count);
if (BFD_SEND (abfd, _bfd_set_section_contents,

View File

@ -181,7 +181,7 @@ unsigned int Chunk = DEFAULT_CHUNK;
/* The type of srec output (free or forced to S3).
This variable can be modified by objcopy's --srec-forceS3
parameter. */
boolean S3Forced = 0;
boolean S3Forced = false;
/* When writing an S-record file, the S-records can not be output as
they are seen. This structure is used to hold them in memory. */
@ -1203,7 +1203,7 @@ srec_get_symtab (abfd, alocation)
csymbols = (asymbol *) bfd_alloc (abfd, symcount * sizeof (asymbol));
if (csymbols == NULL && symcount != 0)
return false;
return (long) false;
abfd->tdata.srec_data->csymbols = csymbols;
for (s = abfd->tdata.srec_data->symbols, c = csymbols;

View File

@ -331,7 +331,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
symbol, ignoring nesting, adding up all the characters in the
symbol names, not including the file numbers in types (the
first number after an open parenthesis). */
if (type == N_BINCL)
if (type == (int) N_BINCL)
{
bfd_vma val;
int nest;
@ -351,13 +351,13 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
incl_type = incl_sym[TYPEOFF];
if (incl_type == 0)
break;
else if (incl_type == N_EINCL)
else if (incl_type == (int) N_EINCL)
{
if (nest == 0)
break;
--nest;
}
else if (incl_type == N_BINCL)
else if (incl_type == (int) N_BINCL)
++nest;
else if (nest == 0)
{
@ -400,7 +400,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
goto error_return;
ne->offset = sym - stabbuf;
ne->val = val;
ne->type = N_BINCL;
ne->type = (int) N_BINCL;
ne->next = secinfo->excls;
secinfo->excls = ne;
@ -422,7 +422,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
/* We have seen this header file before. Tell the final
pass to change the type to N_EXCL. */
ne->type = N_EXCL;
ne->type = (int) N_EXCL;
/* Mark the skipped symbols. */
@ -435,7 +435,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
incl_type = incl_sym[TYPEOFF];
if (incl_type == N_EINCL)
if (incl_type == (int) N_EINCL)
{
if (nest == 0)
{
@ -445,7 +445,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
}
--nest;
}
else if (incl_type == N_BINCL)
else if (incl_type == (int) N_BINCL)
++nest;
else if (nest == 0)
{
@ -597,7 +597,7 @@ _bfd_discard_section_stabs (abfd, stabsec, psecinfo,
type = sym[TYPEOFF];
if (type == N_FUN)
if (type == (int) N_FUN)
{
int strx = bfd_get_32 (abfd, sym + STRDXOFF);
@ -624,7 +624,7 @@ _bfd_discard_section_stabs (abfd, stabsec, psecinfo,
else if (deleting == -1)
{
/* Outside of a function. Check for deleted variables. */
if (type == N_STSYM || type == N_LCSYM)
if (type == (int) N_STSYM || type == (int) N_LCSYM)
if ((*reloc_symbol_deleted_p) (sym + VALOFF - stabbuf, cookie))
{
*pstridx = -1;
@ -674,7 +674,7 @@ _bfd_discard_section_stabs (abfd, stabsec, psecinfo,
BFD_ASSERT (offset != 0);
}
return (skip > 0);
return (boolean) (skip > 0);
error_return:
if (stabbuf != NULL)

View File

@ -713,7 +713,7 @@ boolean
bfd_is_undefined_symclass (symclass)
int symclass;
{
return symclass == 'U' || symclass == 'w' || symclass == 'v';
return (boolean) (symclass == 'U' || symclass == 'w' || symclass == 'v');
}
/*
@ -1069,7 +1069,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
saw_fun = 1;
for (stab = info->stabs; stab < info->stabs + stabsize; stab += STABSIZE)
{
if (stab[TYPEOFF] == N_SO)
if (stab[TYPEOFF] == (bfd_byte) N_SO)
{
/* N_SO with null name indicates EOF */
if (bfd_get_32 (abfd, stab + STRDXOFF) == 0)
@ -1083,12 +1083,12 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
/* two N_SO's in a row is a filename and directory. Skip */
if (stab + STABSIZE < info->stabs + stabsize
&& *(stab + STABSIZE + TYPEOFF) == N_SO)
&& *(stab + STABSIZE + TYPEOFF) == (bfd_byte) N_SO)
{
stab += STABSIZE;
}
}
else if (stab[TYPEOFF] == N_FUN)
else if (stab[TYPEOFF] == (bfd_byte) N_FUN)
{
saw_fun = 1;
++info->indextablesize;
@ -1157,7 +1157,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
{
last_stab = stab;
if (stab + STABSIZE >= info->stabs + stabsize
|| *(stab + STABSIZE + TYPEOFF) != N_SO)
|| *(stab + STABSIZE + TYPEOFF) != (bfd_byte) N_SO)
{
directory_name = NULL;
}

View File

@ -521,7 +521,6 @@ extern const bfd_target bfd_elf32_hppa_vec;
extern const bfd_target bfd_elf32_i370_vec;
extern const bfd_target bfd_elf32_i386_freebsd_vec;
extern const bfd_target bfd_elf32_i386_vec;
extern const bfd_target bfd_elf32_i386qnx_vec;
extern const bfd_target bfd_elf32_i860_little_vec;
extern const bfd_target bfd_elf32_i860_vec;
extern const bfd_target bfd_elf32_i960_vec;
@ -785,7 +784,6 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_i370_vec,
&bfd_elf32_i386_freebsd_vec,
&bfd_elf32_i386_vec,
&bfd_elf32_i386qnx_vec,
&bfd_elf32_i860_little_vec,
&bfd_elf32_i860_vec,
&bfd_elf32_i960_vec,
@ -1249,7 +1247,9 @@ bfd_target_list ()
return NULL;
for (target = &bfd_target_vector[0]; *target != NULL; target++)
*(name_ptr++) = (*target)->name;
if (target == &bfd_target_vector[0]
|| *target != bfd_target_vector[0])
*name_ptr++ = (*target)->name;
return name_list;
}

View File

@ -1 +1 @@
#define BFD_VERSION_DATE 20021011
#define BFD_VERSION_DATE 20021127

View File

@ -1986,6 +1986,7 @@ xcoff_link_add_symbols (abfd, info)
&& h->descriptor == NULL)
{
struct xcoff_link_hash_entry *hds;
struct bfd_link_hash_entry *bh;
hds = xcoff_link_hash_lookup (xcoff_hash_table (info),
h->root.root.string + 1,
@ -1994,13 +1995,14 @@ xcoff_link_add_symbols (abfd, info)
goto error_return;
if (hds->root.type == bfd_link_hash_new)
{
bh = &hds->root;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, hds->root.root.string,
(flagword) 0, bfd_und_section_ptr,
(bfd_vma) 0, (const char *) NULL, false,
true,
(struct bfd_link_hash_entry **) &hds)))
true, &bh)))
goto error_return;
hds = (struct xcoff_link_hash_entry *) bh;
}
hds->flags |= XCOFF_DESCRIPTOR;
BFD_ASSERT ((hds->flags & XCOFF_CALLED) == 0

View File

@ -1,3 +1,29 @@
2002-11-07 Nick Clifton <nickc@redhat.com>
* configure.in (LINGUAS): Add 'da'.
* configure: Regenerate.
* po/da.po: New Danish translation.
2002-10-30 Daniel Jacobowitz <drow@mvista.com>
* po/binutils.pot: Regenerated.
2002-10-28 Daniel Jacobowitz <drow@mvista.com>
Merge from mainline:
2002-10-21 Alan Modra <amodra@bigpond.net.au>
* bucomm.c (list_supported_targets): Use bfd_target_list.
2002-10-09 Daniel Jacobowitz <drow@mvista.com>
* readelf.c (display_debug_info): Ignore empty .rela.debug_info
sections. Allow relocations against the absolute symbol. Don't
use the value in compunit.cu_abbrev_offset if we found a RELA
relocation.
2002-10-21 Svein E. Seldal <Svein.Seldal@solidas.com>
* objdump.c (dump_data): Correct addr_offset for opb != 1.
2002-09-23 Daniel Jacobowitz <drow@mvista.com>
Merge from mainline:
@ -33,7 +59,7 @@
* po/fr.po: Updated French translation.
2002-07-24 Nick Clifton <nickc@redhat.com>
* po/es.po: Updated Spanish translation.
2002-07-23 Daniel Jacobowitz <drow@mvista.com>
@ -151,7 +177,7 @@
2002-06-18 Elias Athanasopoulos <eathan@otenet.gr>
* nm.c (print_size_symbols): Remove assignment, which makes
the symbol's size equal to its value when --size-sort is
the symbol's size equal to its value when --size-sort is
used.
2002-06-18 Dave Brolley <brolley@redhat.com>
@ -211,7 +237,7 @@
DW_CFA_def_cfa_sf and DW_CFA_def_cfa_offset_sf.
2002-06-07 Elias Athanasopoulos <eathan@otenet.gr>
* nm.c: When computing size of symbols for an ELF target use the
internal size field.
@ -428,8 +454,8 @@
bfd_find_nearest_line is non-NULL.
2002-04-25 Elena Zannoni <ezannoni@redhat.com>
* readelf.c (get_AT_name): Handle DW_AT_GNU_vector.
* readelf.c (get_AT_name): Handle DW_AT_GNU_vector.
2002-04-24 Christian Groessler <chris@groessler.org>
@ -455,11 +481,11 @@
2002-04-15 Eric Kohl <ekohl@rz-online.de>
* rcparse.y: Allow two to five parameter in FONT statement of
* rcparse.y: Allow two to five parameter in FONT statement of
DIALOGEX resources.
* resbin.c (bin_to_res_dialog): Fixed read/write code for dialogex
resource data.
(res_to_bin_dialog): Likewise.
(res_to_bin_dialog): Likewise.
* windres.h: Added misssing charset variable to dialog_ex
structure.
@ -469,7 +495,7 @@
2002-04-09 Bernd Herd <info@herdsoft.com>
* rcparse.y: CLASS definitions in DIALOG resources
* rcparse.y: CLASS definitions in DIALOG resources
are quoted.
Fix typo in BEDIT warning.
Don't add default dialog style when explicit style specified.
@ -582,10 +608,10 @@
2002-02-18 Timothy Daly <remote_bob@yahoo.com>
* readelf.c (dump_relocations): Display 2nd and 3rd reloc
types for 64-bit MIPS. Narrow some fields for 80-char
* readelf.c (dump_relocations): Display 2nd and 3rd reloc
types for 64-bit MIPS. Narrow some fields for 80-char
output.
(dump_relocations): Change spelling from 'unrecognised'
(dump_relocations): Change spelling from 'unrecognised'
to 'unrecognized'.
(decode_ARM_machine_flags): Likewise.
(parse_args): Likewise.
@ -712,7 +738,7 @@
(main): Accept -H as an alias for --help.
* objcopy.c (strip_main): Accept -H as an alias for --help.
* objdump.c (main): Accept -v as an alias for --verbose.
* readelf.c (usage): Adjust format to match style used in
* readelf.c (usage): Adjust format to match style used in
other binutils.
* size.c (usage): Update text to provide verbose description
of the command line options.
@ -764,9 +790,9 @@
2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
* objcopy.c (copy_usage): Use "options" instead of "switches".
(strip_usage): Use "options" instead of "switches".
(strip_usage): Use "options" instead of "switches".
* doc/binutils.texi (dlltool): Refer to "options" instead of
"switches".
"switches".
2002-01-14 Richard Earnshaw <rearnsha@arm.com>
@ -1367,9 +1393,9 @@
2001-08-03 John Healy <jhealy@redhat.com>
Patch suggested by Frank Eigler <fche@redhat.com>.
* objdump.c (disassemble_data): Fill in section member of the
disasm_info structure.
Patch suggested by Frank Eigler <fche@redhat.com>.
* objdump.c (disassemble_data): Fill in section member of the
disasm_info structure.
2001-08-03 Tom Walsh <tom@cyberiansoftware.com>
@ -1387,18 +1413,18 @@
2001-07-31 Nick Clifton <nickc@cambridge.redhat.com>
* objcopy.c: Fix formatting.
(section_rename): New structure.
(OPTION_RENAME_SECTION): New switch.
(copy_usage): Document new switch.
(add_section_rename): New function: Add a node to the section
rename list.
(find_section_rename): New function: Find the new name and
flags for a section.
(setup_section): Call find_section_name to determine the name
of the output section.
(copy_main): Handle OPTION_RENAME_SECTION.
* binutils.texi: Document new switch.
* objcopy.c: Fix formatting.
(section_rename): New structure.
(OPTION_RENAME_SECTION): New switch.
(copy_usage): Document new switch.
(add_section_rename): New function: Add a node to the section
rename list.
(find_section_rename): New function: Find the new name and
flags for a section.
(setup_section): Call find_section_name to determine the name
of the output section.
(copy_main): Handle OPTION_RENAME_SECTION.
* binutils.texi: Document new switch.
* NEWS: Mention new switch.
2001-07-30 Nick Clifton <nickc@cambridge.redhat.com>
@ -1562,23 +1588,23 @@
2001-06-18 H.J. Lu <hjl@gnu.org> & Nick Clifton <nickc@redhat.com>
* Makefile.am: Move documentation into doc subdirectory.
* Makefile.in: Regenerated.
* Makefile.am: Move documentation into doc subdirectory.
* Makefile.in: Regenerated.
* binutils.texi: Move into doc subdirectory.
* addr2line.1: Removed.
* ar.1: Likewise.
* dlltool.1: Likewise.
* nlmconv.1: Likewise.
* nm.1: Likewise.
* objcopy.1: Likewise.
* objdump.1: Likewise.
* ranlib.1: Likewise.
* readelf.1: Likewise.
* size.1: Likewise.
* strings.1: Likewise.
* strip.1: Likewise.
* windres.1: Likewise.
* cxxfilt.man: Likewise.
* addr2line.1: Removed.
* ar.1: Likewise.
* dlltool.1: Likewise.
* nlmconv.1: Likewise.
* nm.1: Likewise.
* objcopy.1: Likewise.
* objdump.1: Likewise.
* ranlib.1: Likewise.
* readelf.1: Likewise.
* size.1: Likewise.
* strings.1: Likewise.
* strip.1: Likewise.
* windres.1: Likewise.
* cxxfilt.man: Likewise.
* doc: New Directory.
* doc/Makefile.am: New file.
* doc/Makefile.in: Generate.
@ -1646,7 +1672,7 @@
2001-04-27 Johan Rydberg <jrydberg@opencores.org>
* NEWS: Announce support for OpenRISC.
* NEWS: Announce support for OpenRISC.
2001-04-17 Danny Smith <dannysmith@users.sourceforge.net>

View File

@ -128,16 +128,18 @@ list_supported_targets (name, f)
const char *name;
FILE *f;
{
extern const bfd_target *const *bfd_target_vector;
int t;
const char **targ_names = bfd_target_list ();
if (name == NULL)
fprintf (f, _("Supported targets:"));
else
fprintf (f, _("%s: supported targets:"), name);
for (t = 0; bfd_target_vector[t] != NULL; t++)
fprintf (f, " %s", bfd_target_vector[t]->name);
for (t = 0; targ_names[t] != NULL; t++)
fprintf (f, " %s", targ_names[t]);
fprintf (f, "\n");
free (targ_names);
}
/* List the supported architectures. */

View File

@ -2717,7 +2717,7 @@ EOF
fi
ALL_LINGUAS="fr tr ja es sv"
ALL_LINGUAS="fr tr ja es sv da"
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6

View File

@ -64,7 +64,7 @@ AC_PROG_CC
AC_PROG_YACC
AM_PROG_LEX
ALL_LINGUAS="fr tr ja es sv"
ALL_LINGUAS="fr tr ja es sv da"
CY_GNU_GETTEXT
AM_MAINTAINER_MODE

View File

@ -2237,7 +2237,7 @@ dump_data (abfd)
stop_offset = bfd_section_size (abfd, section) / opb;
}
for (addr_offset = start_offset;
addr_offset < stop_offset; addr_offset += onaline)
addr_offset < stop_offset; addr_offset += onaline / opb)
{
bfd_size_type j;
@ -2255,7 +2255,8 @@ dump_data (abfd)
}
printf (" ");
for (j = addr_offset; j < addr_offset * opb + onaline; j++)
for (j = addr_offset * opb;
j < addr_offset * opb + onaline; j++)
{
if (j >= stop_offset * opb)
printf (" ");

File diff suppressed because it is too large Load Diff

View File

@ -7949,7 +7949,8 @@ display_debug_info (section, start, file)
Elf_Internal_Sym *sym;
if (relsec->sh_type != SHT_RELA
|| SECTION_HEADER (relsec->sh_info) != section)
|| SECTION_HEADER (relsec->sh_info) != section
|| relsec->sh_size == 0)
continue;
if (!slurp_rela_relocs (file, relsec->sh_offset, relsec->sh_size,
@ -7970,7 +7971,8 @@ display_debug_info (section, start, file)
{
sym = symtab + ELF32_R_SYM (rp->r_info);
if (ELF32_ST_TYPE (sym->st_info) != STT_SECTION)
if (ELF32_R_SYM (rp->r_info) != 0
&& ELF32_ST_TYPE (sym->st_info) != STT_SECTION)
{
warn (_("Skipping unexpected symbol type %u\n"),
ELF32_ST_TYPE (sym->st_info));
@ -7981,7 +7983,8 @@ display_debug_info (section, start, file)
{
sym = symtab + ELF64_R_SYM (rp->r_info);
if (ELF64_ST_TYPE (sym->st_info) != STT_SECTION)
if (ELF64_R_SYM (rp->r_info) != 0
&& ELF64_ST_TYPE (sym->st_info) != STT_SECTION)
{
warn (_("Skipping unexpected symbol type %u\n"),
ELF64_ST_TYPE (sym->st_info));
@ -7989,7 +7992,7 @@ display_debug_info (section, start, file)
}
}
compunit.cu_abbrev_offset += rp->r_addend;
compunit.cu_abbrev_offset = rp->r_addend;
break;
}

View File

@ -1,3 +1,40 @@
2002-06-11 Nick Clifton <nickc@cambridge.redhat.com>
Import the following patches from the FSF GCC sources:
2002-03-25 Zack Weinberg <zack@codesourcery.com>
* texi2pod.pl: Handle @end ftable and @end vtable.
2001-12-12 Matthias Klose <doko@debian.org>
* texi2pod.pl: Merge changes from binutils' texi2pod.pl. Allows
generation of more than one man page from one source.
Add '-' to set of valid chars for an identifier.
Let -D option accept flags of the form <flag>=<value>.
Use \s+ for whitespace detection in '@c man' lines.
Handle @set and @clear independent of $output.
Substitute all @value{}'s in a line.
2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
* texi2pod.pl: Handle @ifnottex, @iftex and @display. Handle @var
in verbatim blocks specially. Handle @unnumbered, @unnumberedsec
and @center. Allow [a-z] after @enumerate. Handle 0 and numbers
greater than 9 in enumerations.
2001-07-03 Joseph S. Myers <jsm28@cam.ac.uk>
* texi2pod.pl: Handle @r inside @item.
2002-02-27 Andrew Cagney <ac131313@redhat.com>
* fdl.texi: New file.
2002-02-24 Andrew Cagney <ac131313@redhat.com>
* standards.texi: Import February 14, 2002 version.
* make-stds.texi: Import 2001 version.
2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
* Makefile.in (install): Depend on install-info.
@ -10,7 +47,7 @@
* add-log.el, add-log.vi: New files.
Wed Jan 20 01:33:50 1999 Angela Marie Thomas (angela@cygnus.com)
1999-01-20 Angela Marie Thomas (angela@cygnus.com)
* comp-tools-verify: Remove some checks that are no longer valid.
@ -18,16 +55,16 @@ Wed Jan 20 01:33:50 1999 Angela Marie Thomas (angela@cygnus.com)
* targetdoc/fr30.texi: New document.
Thu Oct 1 21:15:59 1998 Angela Marie Thomas (angela@cygnus.com)
1998-10-01 Angela Marie Thomas (angela@cygnus.com)
* comp-tools-fix, cross-tools-fix: Replace /usr/include
with ${FIXINCDIR}.
Tue Aug 11 19:22:11 1998 Doug Evans <devans@canuck.cygnus.com>
1998-08-11 Doug Evans <devans@canuck.cygnus.com>
* make-rel-sym-tree (version): Update calculation.
Fri Jun 12 21:34:01 1998 Ian Lance Taylor <ian@cygnus.com>
1998-06-12 Ian Lance Taylor <ian@cygnus.com>
* configure.texi: Various additions.
* Makefile.in (TEXI2HTML, DVIPS): New variables.
@ -42,7 +79,7 @@ Fri Jun 12 21:34:01 1998 Ian Lance Taylor <ian@cygnus.com>
* configbuild.ein: New file (EPS version of configbuild.fig).
* configbuild.jin: New file (JPEG version of configbuild.fig).
Wed Jun 10 14:41:25 1998 Ian Lance Taylor <ian@cygnus.com>
1998-06-10 Ian Lance Taylor <ian@cygnus.com>
* configure.texi: New file.
* configdev.tin: New file.

View File

@ -8,6 +8,17 @@
@cindex conventions for makefiles
@cindex standards for makefiles
@c Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001 Free
@c Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.1
@c or any later version published by the Free Software Foundation;
@c with no Invariant Sections, with no
@c Front-Cover Texts, and with no Back-Cover Texts.
@c A copy of the license is included in the section entitled ``GNU
@c Free Documentation License''.
This
@ifinfo
node
@ -21,13 +32,15 @@ chapter
@end ifclear
@end iftex
describes conventions for writing the Makefiles for GNU programs.
Using Automake will help you write a Makefile that follows these
conventions.
@menu
* Makefile Basics:: General Conventions for Makefiles
* Utilities in Makefiles:: Utilities in Makefiles
* Command Variables:: Variables for Specifying Commands
* Directory Variables:: Variables for Installation Directories
* Standard Targets:: Standard Targets for Users
* Makefile Basics:: General Conventions for Makefiles
* Utilities in Makefiles:: Utilities in Makefiles
* Command Variables:: Variables for Specifying Commands
* Directory Variables:: Variables for Installation Directories
* Standard Targets:: Standard Targets for Users
* Install Command Categories:: Three categories of commands in the `install'
rule: normal, pre-install and post-install.
@end menu
@ -79,7 +92,7 @@ foo.1 : foo.man sedscript
@noindent
will fail when the build directory is not the source directory, because
@file{foo.man} and @file{sedscript} are in the the source directory.
@file{foo.man} and @file{sedscript} are in the source directory.
When using GNU @code{make}, relying on @samp{VPATH} to find the source
file will work in the case where there is a single dependency file,
@ -138,7 +151,7 @@ installation should not use any utilities directly except these:
@c dd find
@c gunzip gzip md5sum
@c mkfifo mknod tee uname
@c mkfifo mknod tee uname
@example
cat cmp cp diff echo egrep expr false grep install-info
@ -247,9 +260,10 @@ Every Makefile should define the variable @code{INSTALL}, which is the
basic command for installing a file into the system.
Every Makefile should also define the variables @code{INSTALL_PROGRAM}
and @code{INSTALL_DATA}. (The default for each of these should be
@code{$(INSTALL)}.) Then it should use those variables as the commands
for actual installation, for executables and nonexecutables
and @code{INSTALL_DATA}. (The default for @code{INSTALL_PROGRAM} should
be @code{$(INSTALL)}; the default for @code{INSTALL_DATA} should be
@code{$@{INSTALL@} -m 644}.) Then it should use those variables as the
commands for actual installation, for executables and nonexecutables
respectively. Use these variables as follows:
@example
@ -280,26 +294,28 @@ installed.
Installation directories should always be named by variables, so it is
easy to install in a nonstandard place. The standard names for these
variables are described below. They are based on a standard filesystem
layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and
other modern operating systems.
layout; variants of it are used in SVR4, 4.4BSD, GNU/Linux, Ultrix v4,
and other modern operating systems.
These two variables set the root for the installation. All the other
installation directories should be subdirectories of one of these two,
and nothing should be directly installed into these two directories.
@table @samp
@table @code
@item prefix
@vindex prefix
A prefix used in constructing the default values of the variables listed
below. The default value of @code{prefix} should be @file{/usr/local}.
When building the complete GNU system, the prefix will be empty and
@file{/usr} will be a symbolic link to @file{/}.
(If you are using Autoconf, write it as @samp{@@prefix@@}.)
Running @samp{make install} with a different value of @code{prefix}
from the one used to build the program should @var{not} recompile
the program.
Running @samp{make install} with a different value of @code{prefix} from
the one used to build the program should @emph{not} recompile the
program.
@item exec_prefix
@vindex exec_prefix
A prefix used in constructing the default values of some of the
variables listed below. The default value of @code{exec_prefix} should
be @code{$(prefix)}.
@ -310,20 +326,22 @@ machine-specific files (such as executables and subroutine libraries),
while @code{$(prefix)} is used directly for other directories.
Running @samp{make install} with a different value of @code{exec_prefix}
from the one used to build the program should @var{not} recompile the
from the one used to build the program should @emph{not} recompile the
program.
@end table
Executable programs are installed in one of the following directories.
@table @samp
@table @code
@item bindir
@vindex bindir
The directory for installing executable programs that users can run.
This should normally be @file{/usr/local/bin}, but write it as
@file{$(exec_prefix)/bin}.
(If you are using Autoconf, write it as @samp{@@bindir@@}.)
@item sbindir
@vindex sbindir
The directory for installing executable programs that can be run from
the shell, but are only generally useful to system administrators. This
should normally be @file{/usr/local/sbin}, but write it as
@ -331,6 +349,7 @@ should normally be @file{/usr/local/sbin}, but write it as
(If you are using Autoconf, write it as @samp{@@sbindir@@}.)
@item libexecdir
@vindex libexecdir
@comment This paragraph adjusted to avoid overfull hbox --roland 5jul94
The directory for installing executable programs to be run by other
programs rather than by users. This directory should normally be
@ -623,7 +642,8 @@ the installation commands. @xref{Install Command Categories}.
@item install-strip
Like @code{install}, but strip the executable files while installing
them. In many cases, the definition of this target can be very simple:
them. In simple cases, this target can use the @code{install} target in
a simple way:
@smallexample
install-strip:
@ -631,6 +651,14 @@ install-strip:
install
@end smallexample
But if the package installs scripts as well as real executables, the
@code{install-strip} target can't just refer to the @code{install}
target; it has to strip the executables but not the scripts.
@code{install-strip} should not strip the executables in the build
directory which are being copied for installation. It should only strip
the copies that are installed.
Normally we do not recommend stripping an executable unless you are sure
the program has no bugs. However, it can be reasonable to install a
stripped executable for actual execution while saving the unstripped
@ -745,7 +773,7 @@ The easiest way to do this is to create a subdirectory appropriately
named, use @code{ln} or @code{cp} to install the proper files in it, and
then @code{tar} that subdirectory.
Compress the tar file file with @code{gzip}. For example, the actual
Compress the tar file with @code{gzip}. For example, the actual
distribution file for GCC version 1.40 is called @file{gcc-1.40.tar.gz}.
The @code{dist} target should explicitly depend on all non-source files
@ -793,6 +821,19 @@ installdirs: mkinstalldirs
$(mandir)
@end smallexample
@noindent
or, if you wish to support @env{DESTDIR},
@smallexample
# Make sure all installation directories (e.g. $(bindir))
# actually exist by making them if necessary.
installdirs: mkinstalldirs
$(srcdir)/mkinstalldirs \
$(DESTDIR)$(bindir) $(DESTDIR)$(datadir) \
$(DESTDIR)$(libdir) $(DESTDIR)$(infodir) \
$(DESTDIR)$(mandir)
@end smallexample
This rule should not modify the directories where compilation is done.
It should do nothing but create installation directories.
@end table

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,91 @@
2002-11-20 Alan Modra <amodra@bigpond.net.au>
* write.c (adjust_reloc_syms): Don't reduce SEC_MERGE fixups with
fx_subsy non-NULL.
2002-11-19 Richard Henderson <rth@redhat.com>
* config/obj-elf.c (obj_elf_visibility): Overwrite only the
visibility portion of st_other.
2002-11-19 Luke Deller <luked@cse.unsw.edu.au>
* config/tc-alpha.c (s_alpha_prologue): as_bad when sym is NULL.
2002-11-13 Alan Modra <amodra@bigpond.net.au>
Merge from mainline.
2002-09-04 Alan Modra <amodra@bigpond.net.au>
* config/tc-ppc.c (PPC_HIGHER, PPC_HIGHEST): Fix warning.
(md_parse_option): No -a64 without BFD64.
(ppc_set_cpu): Select appropriate cpu when ppc_obj64.
(ppc_arch): Use bfd_mach_rs6k for bfd_arch_rs6000.
2002-11-06 Richard Henderson <rth@redhat.com>
* config/tc-alpha.c (alpha_validate_fix): Move code ...
(alpha_fix_adjustable): ... here.
* config/tc-alpha.h (TC_VALIDATE_FIX): Remove.
2002-11-05 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (support_64bit_objects): Check *l before it
is freed.
2002-10-31 David O'Brien <obrien@FreeBSD.org>
* config/tc-ia64.c: Cast dwarf2_directive_file to int.
* config/tc-sparc.c: Likewise.
* config/tc-alpha.c: Cast s_alpha_file to int.
* config/tc-alpha.h (TC_INIT_FIX_DATA): info is of type struct
alpha_reloc_tag.
2002-10-30 Daniel Jacobowitz <drow@mvista.com>
* configure.in: Update ARM CPU patterns.
* configure: Regenerated.
2002-10-30 Daniel Jacobowitz <drow@mvista.com>
* po/gas.pot: Regenerated.
2002-10-29 Daniel Jacobowitz <drow@mvista.com>
* itbl-lex.l: Use #include <> for generated headers.
* itbl-ops.c: Likewise.
2002-08-24 Andreas Schwab <schwab@suse.de>
* config/tc-m68k.c (tc_m68k_fix_adjustable): Don't adjust symbols
in merge sections.
2002-10-28 Daniel Jacobowitz <drow@mvista.com>
* doc/gasp.texi: Fix typo in last typo fix.
2002-10-28 Daniel Jacobowitz <drow@mvista.com>
Merge from mainline:
2002-10-21 Richard Sandiford <rsandifo@redhat.com>
* config/tc-mips.c (mips_need_elf_addend_fixup): Return true
for relocs against symbols in a merged section.
Thu Oct 10 14:31:30 2002 J"orn Rennecke <joern.rennecke@superh.com>
* config/tc-sh.c (assemble_ppi): Initialize reg_x / reg_y / reg_n
inside loop.
2002-10-17 Johannes Stezenbach <js@convergence.de>
* itbl-parse.y (entry): Provide empty action.
2002-10-14 Momchil Velikov <velco@fadata.bg>
* config/tc-v850.c (CHECK_): Remove token pasting operator.
2002-10-11 David O'Brien <obrien@FreeBSD.org>
* gas/gasp.texi: Fix typo in noting that gasp is now deprecated.
2002-10-11 Michel Six <msix@ccr.jussieu.fr>
Alan Modra <amodra@bigpond.net.au>

View File

@ -547,7 +547,8 @@ obj_elf_visibility (visibility)
assert (elfsym);
elfsym->internal_elf_sym.st_other = visibility;
elfsym->internal_elf_sym.st_other &= ~3;
elfsym->internal_elf_sym.st_other |= visibility;
if (c == ',')
{

View File

@ -1412,49 +1412,6 @@ alpha_define_label (sym)
alpha_insn_label = sym;
}
/* If we have a BRSGP reloc to a local symbol, adjust it to BRADDR and
let it get resolved at assembly time. */
void
alpha_validate_fix (f)
fixS *f;
{
#ifdef OBJ_ELF
int offset = 0;
const char *name;
if (f->fx_r_type != BFD_RELOC_ALPHA_BRSGP)
return;
if (! S_IS_DEFINED (f->fx_addsy))
return;
switch (S_GET_OTHER (f->fx_addsy) & STO_ALPHA_STD_GPLOAD)
{
case STO_ALPHA_NOPV:
break;
case STO_ALPHA_STD_GPLOAD:
offset = 8;
break;
default:
if (S_IS_LOCAL (f->fx_addsy))
name = "<local>";
else
name = S_GET_NAME (f->fx_addsy);
as_bad_where (f->fx_file, f->fx_line,
_("!samegp reloc against symbol without .prologue: %s"),
name);
break;
}
if (! (S_IS_EXTERN (f->fx_addsy) || S_IS_WEAK (f->fx_addsy)))
{
f->fx_r_type = BFD_RELOC_23_PCREL_S2;
f->fx_offset += offset;
}
#endif
}
/* Return true if we must always emit a reloc for a type and false if
there is some hope of resolving it at assembly time. */
@ -1524,7 +1481,6 @@ alpha_fix_adjustable (f)
case BFD_RELOC_ALPHA_GPDISP_HI16:
case BFD_RELOC_ALPHA_GPDISP_LO16:
case BFD_RELOC_ALPHA_GPDISP:
case BFD_RELOC_ALPHA_BRSGP:
return 0;
case BFD_RELOC_ALPHA_LITERAL:
@ -1562,6 +1518,39 @@ alpha_fix_adjustable (f)
we're preventing this in the other assemblers. Follow for now. */
return 0;
case BFD_RELOC_ALPHA_BRSGP:
/* If we have a BRSGP reloc to a local symbol, adjust it to BRADDR and
let it get resolved at assembly time. */
{
symbolS *sym = f->fx_addsy;
const char *name;
int offset = 0;
if (! S_IS_DEFINED (sym))
return 0;
switch (S_GET_OTHER (sym) & STO_ALPHA_STD_GPLOAD)
{
case STO_ALPHA_NOPV:
break;
case STO_ALPHA_STD_GPLOAD:
offset = 8;
break;
default:
if (S_IS_LOCAL (sym))
name = "<local>";
else
name = S_GET_NAME (sym);
as_bad_where (f->fx_file, f->fx_line,
_("!samegp reloc against symbol without .prologue: %s"),
name);
break;
}
f->fx_r_type = BFD_RELOC_23_PCREL_S2;
f->fx_offset += offset;
return 1;
}
default:
return 1;
}
@ -4537,7 +4526,12 @@ s_alpha_prologue (ignore)
sym = ecoff_get_cur_proc_sym ();
else
sym = alpha_cur_ent_sym;
know (sym != NULL);
if (sym == NULL)
{
as_bad (_(".prologue directive without a preceding .ent directive"));
return;
}
switch (arg)
{
@ -5494,7 +5488,7 @@ const pseudo_typeS md_pseudo_table[] = {
{"fmask", s_alpha_mask, 1},
{"frame", s_alpha_frame, 0},
{"prologue", s_alpha_prologue, 0},
{"file", s_alpha_file, 5},
{"file", (void (*) PARAMS ((int))) s_alpha_file, 5},
{"loc", s_alpha_loc, 9},
{"stabs", s_alpha_stab, 's'},
{"stabn", s_alpha_stab, 'n'},

View File

@ -46,14 +46,12 @@
#define NEED_LITERAL_POOL
#define REPEAT_CONS_EXPRESSIONS
extern void alpha_validate_fix PARAMS ((struct fix *));
extern int alpha_force_relocation PARAMS ((struct fix *));
extern int alpha_fix_adjustable PARAMS ((struct fix *));
extern unsigned long alpha_gprmask, alpha_fprmask;
extern valueT alpha_gp_value;
#define TC_VALIDATE_FIX(FIXP,SEGTYPE,SKIP) alpha_validate_fix (FIXP)
#define TC_FORCE_RELOCATION(FIXP) alpha_force_relocation (FIXP)
#define tc_fix_adjustable(FIXP) alpha_fix_adjustable (FIXP)
#define RELOC_REQUIRES_SYMBOL
@ -152,7 +150,7 @@ struct alpha_fix_tag
#define TC_INIT_FIX_DATA(fixP) \
do { \
fixP->tc_fix_data.next_reloc = (struct fix *)0; \
fixP->tc_fix_data.info = (struct alpha_literal_tag *)0; \
fixP->tc_fix_data.info = (struct alpha_reloc_tag *)0; \
} while (0)
/* Work with DEBUG5 to print fields in tc_fix_type. */

View File

@ -4827,7 +4827,7 @@ const pseudo_typeS md_pseudo_table[] =
{ "body", dot_body, 0 },
{ "prologue", dot_prologue, 0 },
{ "endp", dot_endp, 0 },
{ "file", dwarf2_directive_file, 0 },
{ "file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0 },
{ "loc", dwarf2_directive_loc, 0 },
{ "fframe", dot_fframe, 0 },

View File

@ -68,14 +68,14 @@ static int set_target_endian = 0;
#define PPC_HA(v) PPC_HI ((v) + 0x8000)
/* #higher(value) denotes bits 32 through 47 of the indicated value. */
#define PPC_HIGHER(v) (((v) >> 32) & 0xffff)
#define PPC_HIGHER(v) (((v) >> 16 >> 16) & 0xffff)
/* #highera(value) denotes bits 32 through 47 of the indicated value,
compensating for #lo() being treated as a signed number. */
#define PPC_HIGHERA(v) PPC_HIGHER ((v) + 0x8000)
/* #highest(value) denotes bits 48 through 63 of the indicated value. */
#define PPC_HIGHEST(v) (((v) >> 48) & 0xffff)
#define PPC_HIGHEST(v) (((v) >> 24 >> 24) & 0xffff)
/* #highesta(value) denotes bits 48 through 63 of the indicated value,
compensating for #lo being treated as a signed number. */
@ -852,7 +852,13 @@ md_parse_option (c, arg)
/* a64 and a32 determine whether to use XCOFF64 or XCOFF32. */
case 'a':
if (strcmp (arg, "64") == 0)
ppc_obj64 = 1;
{
#ifdef BFD64
ppc_obj64 = 1;
#else
as_fatal (_("%s unsupported"), "-a64");
#endif
}
else if (strcmp (arg, "32") == 0)
ppc_obj64 = 0;
else
@ -1062,8 +1068,10 @@ ppc_set_cpu ()
if (ppc_cpu == 0)
{
if (strncmp (default_os, "aix", 3) == 0
&& default_os[3] >= '4' && default_os[3] <= '9')
if (ppc_obj64)
ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_64;
else if (strncmp (default_os, "aix", 3) == 0
&& default_os[3] >= '4' && default_os[3] <= '9')
ppc_cpu = PPC_OPCODE_COMMON | PPC_OPCODE_32;
else if (strncmp (default_os, "aix3", 4) == 0)
ppc_cpu = PPC_OPCODE_POWER | PPC_OPCODE_32;
@ -1109,7 +1117,12 @@ ppc_arch ()
unsigned long
ppc_mach ()
{
return ppc_obj64 ? bfd_mach_ppc64 : bfd_mach_ppc;
if (ppc_obj64)
return bfd_mach_ppc64;
else if (ppc_arch () == bfd_arch_rs6000)
return bfd_mach_rs6k;
else
return bfd_mach_ppc;
}
extern char*

View File

@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
02111-1307, USA. */
#include <stdio.h>
#include "as.h"
@ -82,7 +82,7 @@ static void s390_literals PARAMS ((int));
const pseudo_typeS md_pseudo_table[] =
{
{ "align", s_align_bytes, 0 },
/* Pseudo-ops which must be defined. */
/* Pseudo-ops which must be defined. */
{ "bss", s390_bss, 0 },
{ "insn", s390_insn, 0 },
/* Pseudo-ops which must be overridden. */
@ -121,7 +121,7 @@ struct pd_reg
sp has the value 15
lit has the value 12
The table is sorted. Suitable for searching by a binary search. */
The table is sorted. Suitable for searching by a binary search. */
static const struct pd_reg pre_defined_registers[] =
{
@ -312,7 +312,7 @@ const int md_short_jump_size = 4;
const int md_long_jump_size = 4;
#endif
CONST char *md_shortopts = "A:m:kVQ:";
const char *md_shortopts = "A:m:kVQ:";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};
@ -560,7 +560,7 @@ s390_insert_operand (insn, operand, val, file, line)
{
addressT min, max;
max = (((addressT) 1 << (operand->bits - 1))<<1) - 1;
max = (((addressT) 1 << (operand->bits - 1)) << 1) - 1;
min = (offsetT) 0;
uval = (addressT) val;
/* Length x in an instructions has real length x+1. */
@ -591,7 +591,7 @@ s390_insert_operand (insn, operand, val, file, line)
/* Insert fragments of the operand byte for byte. */
offset = operand->shift + operand->bits;
uval <<= (-offset) & 7;
insn += (offset - 1)/8;
insn += (offset - 1) / 8;
while (uval != 0)
{
*insn-- |= uval;
@ -724,7 +724,7 @@ static int lp_count = 0;
static int lpe_count = 0;
static int
s390_exp_compare(exp1, exp2)
s390_exp_compare (exp1, exp2)
expressionS *exp1;
expressionS *exp2;
{
@ -771,8 +771,8 @@ s390_exp_compare(exp1, exp2)
&& (exp1->X_op_symbol == exp2->X_op_symbol)
&& (exp1->X_add_number == exp2->X_add_number);
default:
return 0;
}
return 0;
}
}
/* Test for @lit and if its present make an entry in the literal pool and
@ -852,7 +852,7 @@ s390_lit_suffix (str_p, exp_p, suffix)
/* Processing for 'normal' data types. */
for (lpe = lpe_list; lpe != NULL; lpe = lpe->next)
if (lpe->nbytes == nbytes && lpe->reloc == reloc
&& s390_exp_compare(exp_p, &lpe->ex) != 0)
&& s390_exp_compare (exp_p, &lpe->ex) != 0)
break;
}
@ -866,7 +866,7 @@ s390_lit_suffix (str_p, exp_p, suffix)
}
else
{
lpe = (struct s390_lpe *) xmalloc(sizeof (struct s390_lpe));
lpe = (struct s390_lpe *) xmalloc (sizeof (struct s390_lpe));
}
lpe->ex = *exp_p;
@ -877,7 +877,7 @@ s390_lit_suffix (str_p, exp_p, suffix)
lpe->floatnum = generic_floating_point_number;
else if (exp_p->X_add_number <= 4)
memcpy (lpe->bignum, generic_bignum,
exp_p->X_add_number*sizeof (LITTLENUM_TYPE));
exp_p->X_add_number * sizeof (LITTLENUM_TYPE));
else
as_bad (_("Big number is too big"));
}
@ -888,13 +888,13 @@ s390_lit_suffix (str_p, exp_p, suffix)
if (lp_sym == NULL)
{
sprintf (tmp_name, ".L\001%i", lp_count);
lp_sym = symbol_make(tmp_name);
lp_sym = symbol_make (tmp_name);
}
/* Make name for literal pool entry. */
sprintf (tmp_name, ".L\001%i\002%i", lp_count, lpe_count);
lpe_count++;
lpe->sym = symbol_make(tmp_name);
lpe->sym = symbol_make (tmp_name);
/* Add to literal pool list. */
lpe->next = NULL;
@ -984,7 +984,7 @@ s390_elf_cons (nbytes)
}
while (*input_line_pointer++ == ',');
input_line_pointer--; /* Put terminator back into stream. */
input_line_pointer--; /* Put terminator back into stream. */
demand_empty_rest_of_line ();
}
@ -1019,7 +1019,8 @@ md_gather_operands (str, insn, opcode)
char *f;
int fc, i;
while (ISSPACE (*str)) str++;
while (ISSPACE (*str))
str++;
parentheses = 0;
skip_optional = 0;
@ -1047,7 +1048,8 @@ md_gather_operands (str, insn, opcode)
hold = input_line_pointer;
input_line_pointer = str;
if (! register_name (&ex)) /* parse the operand */
/* Parse the operand. */
if (! register_name (&ex))
expression (&ex);
str = input_line_pointer;
@ -1397,7 +1399,7 @@ s390_insn (ignore)
if (strcmp (opformat->name, "e") != 0 && *input_line_pointer++ != ',')
as_bad (_("missing comma after insn constant\n"));
if ((s = strchr (input_line_pointer, '\n')) != NULL)
*s = '\0';
input_line_pointer = md_gather_operands (input_line_pointer, insn,
@ -1453,7 +1455,7 @@ s390_literals (ignore)
struct s390_lpe *lpe;
if (lp_sym == NULL || lpe_count == 0)
return; /* nothing to be done */
return; /* Nothing to be done. */
/* Emit symbol for start of literal pool. */
S_SET_SEGMENT (lp_sym, now_seg);
@ -1492,7 +1494,7 @@ s390_literals (ignore)
generic_floating_point_number = lpe->floatnum;
else
memcpy (generic_bignum, lpe->bignum,
lpe->ex.X_add_number*sizeof (LITTLENUM_TYPE));
lpe->ex.X_add_number * sizeof (LITTLENUM_TYPE));
}
emit_expr (&lpe->ex, lpe->nbytes);
}
@ -1590,18 +1592,18 @@ symbolS *
md_undefined_symbol (name)
char *name;
{
if (*name == '_' && *(name+1) == 'G'
if (*name == '_' && *(name + 1) == 'G'
&& strcmp (name, "_GLOBAL_OFFSET_TABLE_") == 0)
{
if (!GOT_symbol)
{
if (symbol_find (name))
as_bad (_("GOT already in symbol table"));
GOT_symbol = symbol_new (name, undefined_section,
(valueT) 0, &zero_address_frag);
}
return GOT_symbol;
}
{
if (!GOT_symbol)
{
if (symbol_find (name))
as_bad (_("GOT already in symbol table"));
GOT_symbol = symbol_new (name, undefined_section,
(valueT) 0, &zero_address_frag);
}
return GOT_symbol;
}
return 0;
}
@ -1623,17 +1625,16 @@ md_pcrel_from_section (fixp, sec)
to make sure that the dynamic relocations are done correctly, so in
some cases we force the original symbol to be used. */
int
tc_s390_fix_adjustable(fixP)
fixS * fixP;
tc_s390_fix_adjustable (fixP)
fixS *fixP;
{
/* Prevent all adjustments to global symbols. */
if (S_IS_EXTERN (fixP->fx_addsy))
return 0;
if (S_IS_WEAK (fixP->fx_addsy))
return 0;
/* Don't adjust pc-relative references to merge sections. */
if ((S_GET_SEGMENT(fixP->fx_addsy)->flags & SEC_MERGE) != 0
&& fixP->fx_pcrel)
/* Don't adjust references to merge sections. */
if ((S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0)
return 0;
/* adjust_reloc_syms doesn't know about the GOT. */
if ( fixP->fx_r_type == BFD_RELOC_32_GOTOFF
@ -1698,11 +1699,11 @@ md_apply_fix3 (fixP, valP, seg)
segT seg;
{
char *where;
valueT value = * valP;
valueT value = *valP;
where = fixP->fx_frag->fr_literal + fixP->fx_where;
if (fixP->fx_subsy != NULL)
if (fixP->fx_subsy != NULL)
{
if ((fixP->fx_addsy != NULL
&& S_GET_SEGMENT (fixP->fx_addsy) == S_GET_SEGMENT (fixP->fx_subsy)
@ -1712,24 +1713,24 @@ md_apply_fix3 (fixP, valP, seg)
if (!S_IS_DEFINED (fixP->fx_subsy))
as_bad_where (fixP->fx_file, fixP->fx_line,
_("unresolved fx_subsy symbol that must be resolved"));
value -= S_GET_VALUE(fixP->fx_subsy);
value -= S_GET_VALUE (fixP->fx_subsy);
if (S_GET_SEGMENT (fixP->fx_subsy) == seg && ! fixP->fx_pcrel)
value += MD_PCREL_FROM_SECTION (fixP, seg);
}
if (fixP->fx_addsy != NULL)
if (fixP->fx_addsy != NULL)
{
if ((fixP->fx_subsy != NULL
&& S_GET_SEGMENT (fixP->fx_addsy) == S_GET_SEGMENT (fixP->fx_subsy)
&& SEG_NORMAL (S_GET_SEGMENT(fixP->fx_addsy)))
&& SEG_NORMAL (S_GET_SEGMENT (fixP->fx_addsy)))
|| (S_GET_SEGMENT (fixP->fx_addsy) == seg
&& fixP->fx_pcrel && TC_RELOC_RTSYM_LOC_FIXUP (fixP))
|| (!fixP->fx_pcrel
|| (!fixP->fx_pcrel
&& S_GET_SEGMENT (fixP->fx_addsy) == absolute_section)
|| (S_GET_SEGMENT (fixP->fx_addsy) != undefined_section
&& !bfd_is_com_section (S_GET_SEGMENT (fixP->fx_addsy))
&& TC_FIX_ADJUSTABLE(fixP)))
&& TC_FIX_ADJUSTABLE (fixP)))
value -= S_GET_VALUE (fixP->fx_addsy);
if (fixP->fx_pcrel)
@ -1965,8 +1966,8 @@ tc_gen_reloc (seg, fixp)
if (reloc->howto == NULL)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
_("cannot represent relocation type %s"),
bfd_get_reloc_code_name (code));
_("cannot represent relocation type %s"),
bfd_get_reloc_code_name (code));
/* Set howto to a garbage value so that we can keep going. */
reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32);
assert (reloc->howto != NULL);

View File

@ -1,5 +1,5 @@
/* tc-s390.h -- Header file for tc-s390.c.
Copyright 2000, 2001 Free Software Foundation, Inc.
Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
Written by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of GAS, the GNU Assembler.
@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
02111-1307, USA. */
#define TC_S390
@ -34,7 +34,7 @@ struct fix;
are willing to perform this relocation while building the .o file.
This is only used for pcrel relocations, so GOTOFF does not need to be
checked here. I am not sure if some of the others are ever used with
pcrel, but it is easier to be safe than sorry. */
pcrel, but it is easier to be safe than sorry. */
#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
((FIX)->fx_r_type != BFD_RELOC_390_GOTENT \
@ -59,9 +59,9 @@ extern enum bfd_architecture s390_arch PARAMS ((void));
/* The target BFD format. */
#define TARGET_FORMAT s390_target_format()
extern const char * s390_target_format PARAMS ((void));
extern const char *s390_target_format PARAMS ((void));
/* Set the endianness we are using. */
/* Set the endianness we are using. */
#define TARGET_BYTES_BIG_ENDIAN 1
/* Whether or not the target is big endian */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,232 @@
/* This file is tc-sh.h
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
GAS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GAS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define TC_SH
#define TARGET_ARCH bfd_arch_sh
#if ANSI_PROTOTYPES
struct segment_info_struct;
struct internal_reloc;
#endif
/* Whether -relax was used. */
extern int sh_relax;
/* Whether -small was used. */
extern int sh_small;
/* Don't try to break words. */
#define WORKING_DOT_WORD
/* All SH instructions are multiples of 16 bits. */
#define DWARF2_LINE_MIN_INSN_LENGTH 2
/* We require .long, et. al., to be aligned correctly. */
#define md_cons_align(nbytes) sh_cons_align (nbytes)
extern void sh_cons_align PARAMS ((int));
/* When relaxing, we need to generate relocations for alignment
directives. */
#define HANDLE_ALIGN(frag) sh_handle_align (frag)
extern void sh_handle_align PARAMS ((fragS *));
#define MAX_MEM_FOR_RS_ALIGN_CODE (1 + 2)
/* We need to force out some relocations when relaxing. */
#define TC_FORCE_RELOCATION(fix) sh_force_relocation (fix)
/* The type fixS is defined (to struct fix) in write.h, but write.h uses
definitions from this file. To avoid problems with including write.h
after the "right" definitions, don't; just forward-declare struct fix
here. */
struct fix;
extern int sh_force_relocation PARAMS ((struct fix *));
#ifdef OBJ_ELF
#define obj_fix_adjustable(fixP) sh_fix_adjustable(fixP)
struct fix;
extern boolean sh_fix_adjustable PARAMS ((struct fix *));
/* This arranges for gas/write.c to not apply a relocation if
obj_fix_adjustable() says it is not adjustable. */
/* ??? fixups with symbols in SEC_MERGE sections are marked with
obj_fix_adjustable and have a non-section symbol, as in
"vwxyz"+1 in execute/string-opt-6.c . Maybe the test of
(symbol_used_in_reloc_p should be done in the machine-independent code. */
#define TC_FIX_ADJUSTABLE(fixP) \
(! symbol_used_in_reloc_p (fixP->fx_addsy) && obj_fix_adjustable (fixP))
#endif
#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC)
extern long md_pcrel_from_section PARAMS ((struct fix *, segT));
#define IGNORE_NONSTANDARD_ESCAPES
#define LISTING_HEADER \
(!target_big_endian \
? "Hitachi Super-H GAS Little Endian" : "Hitachi Super-H GAS Big Endian")
#define md_operand(x)
extern const struct relax_type md_relax_table[];
#define TC_GENERIC_RELAX_TABLE md_relax_table
/* We record, for each section, whether we have most recently output a
CODE reloc or a DATA reloc. */
struct sh_segment_info_type
{
int in_code : 1;
};
#define TC_SEGMENT_INFO_TYPE struct sh_segment_info_type
/* We call a routine to emit a reloc for a label, so that the linker
can align loads and stores without crossing a label. */
extern void sh_frob_label PARAMS ((void));
#define tc_frob_label(sym) sh_frob_label ()
/* We call a routine to flush pending output in order to output a DATA
reloc when required. */
extern void sh_flush_pending_output PARAMS ((void));
#define md_flush_pending_output() sh_flush_pending_output ()
#ifdef BFD_ASSEMBLER
#define tc_frob_file_before_adjust sh_frob_file
#else
#define tc_frob_file sh_frob_file
#endif
extern void sh_frob_file PARAMS ((void));
#ifdef OBJ_COFF
/* COFF specific definitions. */
#define DO_NOT_STRIP 0
/* This macro translates between an internal fix and an coff reloc type */
#define TC_COFF_FIX2RTYPE(fix) ((fix)->fx_r_type)
#define BFD_ARCH TARGET_ARCH
#define COFF_MAGIC (!target_big_endian ? SH_ARCH_MAGIC_LITTLE : SH_ARCH_MAGIC_BIG)
/* We need to write out relocs which have not been completed. */
#define TC_COUNT_RELOC(fix) ((fix)->fx_addsy != NULL)
#define TC_RELOC_MANGLE(seg, fix, int, paddr) \
sh_coff_reloc_mangle ((seg), (fix), (int), (paddr))
extern void sh_coff_reloc_mangle
PARAMS ((struct segment_info_struct *, struct fix *,
struct internal_reloc *, unsigned int));
#define tc_coff_symbol_emit_hook(a) ; /* not used */
#define NEED_FX_R_TYPE 1
#define TC_KEEP_FX_OFFSET 1
#define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep(frag)
extern int tc_coff_sizemachdep PARAMS ((fragS *));
#ifdef BFD_ASSEMBLER
#define SEG_NAME(SEG) segment_name (SEG)
#else
#define SEG_NAME(SEG) obj_segment_name (SEG)
#endif
/* We align most sections to a 16 byte boundary. */
#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) \
(strncmp (SEG_NAME (SEG), ".stabstr", 8) == 0 \
? 0 \
: ((strncmp (SEG_NAME (SEG), ".stab", 5) == 0 \
|| strcmp (SEG_NAME (SEG), ".ctors") == 0 \
|| strcmp (SEG_NAME (SEG), ".dtors") == 0) \
? 2 \
: (sh_small ? 2 : 4)))
#endif /* OBJ_COFF */
#ifdef OBJ_ELF
/* ELF specific definitions. */
/* Whether or not the target is big endian */
extern int target_big_endian;
#ifdef TE_LINUX
#define TARGET_FORMAT (!target_big_endian ? "elf32-sh-linux" : "elf32-shbig-linux")
#elif defined(TE_NetBSD)
#define TARGET_FORMAT (!target_big_endian ? "elf32-shl-nbsd" : "elf32-sh-nbsd")
#else
#define TARGET_FORMAT (!target_big_endian ? "elf32-shl" : "elf32-sh")
#endif
#define elf_tc_final_processing sh_elf_final_processing
extern void sh_elf_final_processing PARAMS ((void));
#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */
#define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
/* This is the relocation type for direct references to
GLOBAL_OFFSET_TABLE. It comes up in complicated expressions such
as _GLOBAL_OFFSET_TABLE_+[.-.L284], which cannot be expressed
normally with the regular expressions. The fixup specified here
when used at runtime implies that we should add the address of the
GOT to the specified location, and as a result we have simplified
the expression into something we can use. */
#define TC_RELOC_GLOBAL_OFFSET_TABLE BFD_RELOC_SH_GOTPC
/* This expression evaluates to false if the relocation is for a local object
for which we still want to do the relocation at runtime. True if we
are willing to perform this relocation while building the .o file.
This is only used for pcrel relocations, so GOTOFF does not need to be
checked here. I am not sure if some of the others are ever used with
pcrel, but it is easier to be safe than sorry.
We can't resolve references to the GOT or the PLT when creating the
object file, since these tables are only created by the linker.
Also, if the symbol is global, weak, common or not defined, the
assembler can't compute the appropriate reloc, since its location
can only be determined at link time. */
#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
((FIX)->fx_r_type != BFD_RELOC_32_PLT_PCREL \
&& (FIX)->fx_r_type != BFD_RELOC_32_GOT_PCREL \
&& (FIX)->fx_r_type != BFD_RELOC_SH_GOTPC \
&& ((FIX)->fx_addsy == NULL \
|| (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
&& ! S_IS_WEAK ((FIX)->fx_addsy) \
&& S_IS_DEFINED ((FIX)->fx_addsy) \
&& ! S_IS_COMMON ((FIX)->fx_addsy))))
#define md_parse_name(name, exprP, nextcharP) \
sh_parse_name ((name), (exprP), (nextcharP))
int sh_parse_name PARAMS ((char const *name,
expressionS *exprP,
char *nextchar));
#define TC_CONS_FIX_NEW(FRAG, OFF, LEN, EXP) \
sh_cons_fix_new ((FRAG), (OFF), (LEN), (EXP))
void sh_cons_fix_new PARAMS ((fragS *, int, int, expressionS *));
/* This is used to construct expressions out of @GOTOFF, @PLT and @GOT
symbols. The relocation type is stored in X_md. */
#define O_PIC_reloc O_md1
#endif /* OBJ_ELF */

View File

@ -159,7 +159,7 @@ const pseudo_typeS md_pseudo_table[] =
{"uaword", s_uacons, 4},
{"uaxword", s_uacons, 8},
#ifdef OBJ_ELF
{"file", dwarf2_directive_file, 0},
{"file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0},
{"loc", dwarf2_directive_loc, 0},
/* These are specific to sparc/svr4. */
{"2byte", s_uacons, 2},

View File

@ -1086,7 +1086,7 @@ parse_register_list (insn, operand)
return NULL;
}
CONST char *md_shortopts = "m:";
const char *md_shortopts = "m:";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
@ -1461,7 +1461,7 @@ v850_reloc_prefix (operand)
}
#define CHECK_(name, reloc) \
if (strncmp (input_line_pointer, name##"(", strlen (name) + 1) == 0) \
if (strncmp (input_line_pointer, name "(", strlen (name) + 1) == 0) \
{ \
input_line_pointer += strlen (name); \
return reloc; \
@ -1961,7 +1961,7 @@ md_assemble (str)
if (((insn & 0x07e0) == 0x0200)
&& ex.X_op == O_constant
&& (ex.X_add_number < (-(1 << (operand->bits - 1)))
|| ex.X_add_number > ((1 << operand->bits) - 1)))
|| ex.X_add_number > ((1 << (operand->bits - 1)) - 1)))
errmsg = _("immediate operand is too large");
}

View File

@ -1,5 +1,6 @@
/* tc-v850.h -- Header file for tc-v850.c.
Copyright 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
Copyright 1996, 1997, 1998, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -20,7 +21,7 @@
#define TC_V850
#include <elf/v850.h>
#include "elf/v850.h"
#define TARGET_BYTES_BIG_ENDIAN 0

File diff suppressed because it is too large Load Diff

View File

@ -115,14 +115,8 @@ changequote([,])dnl
endian=
case ${cpu} in
alpha*) cpu_type=alpha ;;
armeb) cpu_type=arm endian=big ;;
arm*) cpu_type=arm endian=little ;;
armb*) cpu_type=arm endian=little ;;
armv*l) cpu_type=arm endian=little ;;
armv*b) cpu_type=arm endian=big ;;
xscale*) cpu_type=arm endian=little ;;
strongarm*) cpu_type=arm endian=little ;;
thumb*) cpu_type=arm endian=little ;;
arm*b|xscale*b|strongarm*b) cpu_type=arm endian=big ;;
arm*|xscale*|strongarm*) cpu_type=arm endian=little ;;
hppa*) cpu_type=hppa ;;
changequote(,)dnl
i[3456]86) cpu_type=i386 arch=i386;;

View File

@ -22,7 +22,8 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "itbl-parse.h"
#include <itbl-parse.h>
#ifdef DEBUG
#define DBG(x) printf x

View File

@ -92,7 +92,7 @@
#include <stdlib.h>
#include <string.h>
#include "itbl-ops.h"
#include "itbl-parse.h"
#include <itbl-parse.h>
/* #define DEBUG */

View File

@ -321,6 +321,7 @@ entry:
insn=itbl_add_insn ($1, $3, $4, sbit, ebit, $6);
}
fieldspecs NL
{}
| NL
| error NL
;

File diff suppressed because it is too large Load Diff

View File

@ -881,7 +881,8 @@ adjust_reloc_syms (abfd, sec, xxx)
/* Never adjust a reloc against local symbol in a merge section
with non-zero addend. */
if ((symsec->flags & SEC_MERGE) && fixp->fx_offset)
if ((symsec->flags & SEC_MERGE) != 0
&& (fixp->fx_offset != 0 || fixp->fx_subsy != NULL))
{
symbol_mark_used_in_reloc (fixp->fx_addsy);
goto done;

View File

@ -70,7 +70,9 @@ INSTOBJEXT = @INSTOBJEXT@
.po.gmo:
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
&& test -w $$file \
&& (rm -f $$file && $(GMSGFMT) -o $$file $< ) \
|| echo "$$file is not writable"
.po.cat:
sed -f ../intl/po2msg.sed < $< > $*.msg \

View File

@ -1,12 +1,13 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2002-01-31 18:32+0000\n"
"POT-Creation-Date: 2002-10-30 10:08-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -14,46 +15,46 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: alpha.c:93 mips.c:47
#: alpha.c:103 mips.c:57
msgid "<indirect child>"
msgstr ""
#: alpha.c:110 mips.c:64
#: alpha.c:120 mips.c:74
#, c-format
msgid "[find_call] %s: 0x%lx to 0x%lx\n"
msgstr ""
#: alpha.c:132
#: alpha.c:142
#, c-format
msgid "[find_call] 0x%lx: jsr%s <indirect_child>\n"
msgstr ""
#: alpha.c:142
#: alpha.c:152
#, c-format
msgid "[find_call] 0x%lx: bsr"
msgstr ""
#: basic_blocks.c:122 call_graph.c:90 hist.c:93
#: basic_blocks.c:134 call_graph.c:94 hist.c:98
#, c-format
msgid "%s: %s: unexpected end of file\n"
msgstr ""
#: basic_blocks.c:190
#: basic_blocks.c:202
#, c-format
msgid "%s: warning: ignoring basic-block exec counts (use -l or --line)\n"
msgstr ""
#. FIXME: This only works if bfd_vma is unsigned long.
#: basic_blocks.c:281 basic_blocks.c:291
#: basic_blocks.c:295 basic_blocks.c:305
#, c-format
msgid "%s:%d: (%s:0x%lx) %lu executions\n"
msgstr ""
#: basic_blocks.c:282 basic_blocks.c:292
#: basic_blocks.c:296 basic_blocks.c:306
msgid "<unknown>"
msgstr ""
#: basic_blocks.c:536
#: basic_blocks.c:553
#, c-format
msgid ""
"\n"
@ -64,140 +65,141 @@ msgid ""
"\n"
msgstr ""
#: basic_blocks.c:560
#: basic_blocks.c:577
msgid ""
"\n"
"Execution Summary:\n"
"\n"
msgstr ""
#: basic_blocks.c:561
#: basic_blocks.c:578
#, c-format
msgid "%9ld Executable lines in this file\n"
msgstr ""
#: basic_blocks.c:563
#: basic_blocks.c:580
#, c-format
msgid "%9ld Lines executed\n"
msgstr ""
#: basic_blocks.c:564
#: basic_blocks.c:581
#, c-format
msgid "%9.2f Percent of the file executed\n"
msgstr ""
#: basic_blocks.c:568
#: basic_blocks.c:585
#, c-format
msgid ""
"\n"
"%9lu Total number of line executions\n"
msgstr ""
#: basic_blocks.c:570
#: basic_blocks.c:587
#, c-format
msgid "%9.2f Average executions per line\n"
msgstr ""
#: call_graph.c:69
#: call_graph.c:71
#, c-format
msgid "[cg_tally] arc from %s to %s traversed %lu times\n"
msgstr ""
#: cg_print.c:58
#: cg_print.c:73
msgid ""
"\t\t Call graph (explanation follows)\n"
"\n"
msgstr ""
#: cg_print.c:60
#: cg_print.c:75
msgid ""
"\t\t\tCall graph\n"
"\n"
msgstr ""
#: cg_print.c:63 hist.c:355
#: cg_print.c:78 hist.c:363
#, c-format
msgid ""
"\n"
"granularity: each sample hit covers %ld byte(s)"
msgstr ""
#: cg_print.c:67
#: cg_print.c:82
#, c-format
msgid ""
" for %.2f%% of %.2f seconds\n"
"\n"
msgstr ""
#: cg_print.c:71
#: cg_print.c:86
msgid ""
" no time propagated\n"
"\n"
msgstr ""
#: cg_print.c:80 cg_print.c:83 cg_print.c:85
#: cg_print.c:95 cg_print.c:98 cg_print.c:100
msgid "called"
msgstr ""
#: cg_print.c:80 cg_print.c:85
#: cg_print.c:95 cg_print.c:100
msgid "total"
msgstr ""
#: cg_print.c:80
#: cg_print.c:95
msgid "parents"
msgstr ""
#: cg_print.c:82 cg_print.c:83
#: cg_print.c:97 cg_print.c:98
msgid "index"
msgstr ""
#: cg_print.c:82
#: cg_print.c:97
#, c-format
msgid "%time"
msgstr ""
#: cg_print.c:82 cg_print.c:83
#: cg_print.c:97 cg_print.c:98
msgid "self"
msgstr ""
#: cg_print.c:82
#: cg_print.c:97
msgid "descendants"
msgstr ""
#: cg_print.c:83 hist.c:381
#: cg_print.c:98 hist.c:389
msgid "name"
msgstr ""
#: cg_print.c:85
#: cg_print.c:100
msgid "children"
msgstr ""
#: cg_print.c:90
#: cg_print.c:105
#, c-format
msgid "index %% time self children called name\n"
msgstr ""
#: cg_print.c:113
#: cg_print.c:129
#, c-format
msgid " <cycle %d as a whole> [%d]\n"
msgstr ""
#: cg_print.c:339
#: cg_print.c:363
#, c-format
msgid "%6.6s %5.5s %7.7s %11.11s %7.7s %7.7s <spontaneous>\n"
msgstr ""
#: cg_print.c:340
#: cg_print.c:364
#, c-format
msgid "%6.6s %5.5s %7.7s %7.7s %7.7s %7.7s <spontaneous>\n"
msgstr ""
#: cg_print.c:574
#: cg_print.c:604
msgid ""
"Index by function name\n"
"\n"
msgstr ""
#: cg_print.c:631 cg_print.c:640
#: cg_print.c:661 cg_print.c:670
#, c-format
msgid "<cycle %d>"
msgstr ""
@ -212,132 +214,132 @@ msgstr ""
msgid "%s: unable to parse mapping file %s.\n"
msgstr ""
#: corefile.c:154
#: corefile.c:155
#, c-format
msgid "%s: %s: not in a.out format\n"
msgstr ""
#: corefile.c:165
#: corefile.c:166
#, c-format
msgid "%s: can't find .text section in %s\n"
msgstr ""
#: corefile.c:223
#: corefile.c:225
#, c-format
msgid "%s: ran out room for %lu bytes of text space\n"
msgstr ""
#: corefile.c:237
#: corefile.c:239
#, c-format
msgid "%s: can't do -c\n"
msgstr ""
#: corefile.c:272
#: corefile.c:276
#, c-format
msgid "%s: -c not supported on architecture %s\n"
msgstr ""
#: corefile.c:439
#: corefile.c:447
#, c-format
msgid "%s: file `%s' has no symbols\n"
msgstr ""
#: corefile.c:739
#: corefile.c:748
#, c-format
msgid "%s: somebody miscounted: ltab.len=%d instead of %ld\n"
msgstr ""
#: gmon_io.c:83 gmon_io.c:137 gmon_io.c:188 gmon_io.c:216 gmon_io.c:386
#: gmon_io.c:413 gmon_io.c:609 gmon_io.c:634
#: gmon_io.c:96 gmon_io.c:159 gmon_io.c:219 gmon_io.c:251 gmon_io.c:422
#: gmon_io.c:449 gmon_io.c:646 gmon_io.c:671
#, c-format
msgid "%s: bits per address has unexpected value of %u\n"
msgstr ""
#: gmon_io.c:252 gmon_io.c:347
#: gmon_io.c:288 gmon_io.c:383
#, c-format
msgid "%s: file too short to be a gmon file\n"
msgstr ""
#: gmon_io.c:262 gmon_io.c:396
#: gmon_io.c:298 gmon_io.c:432
#, c-format
msgid "%s: file `%s' has bad magic cookie\n"
msgstr ""
#: gmon_io.c:273
#: gmon_io.c:309
#, c-format
msgid "%s: file `%s' has unsupported version %d\n"
msgstr ""
#: gmon_io.c:303
#: gmon_io.c:339
#, c-format
msgid "%s: %s: found bad tag %d (file corrupted?)\n"
msgstr ""
#: gmon_io.c:369
#: gmon_io.c:405
#, c-format
msgid "%s: profiling rate incompatible with first gmon file\n"
msgstr ""
#: gmon_io.c:429
#: gmon_io.c:465
#, c-format
msgid "%s: incompatible with first gmon file\n"
msgstr ""
#: gmon_io.c:457
#: gmon_io.c:493
#, c-format
msgid "%s: file '%s' does not appear to be in gmon.out format\n"
msgstr ""
#: gmon_io.c:478
#: gmon_io.c:514
#, c-format
msgid "%s: unexpected EOF after reading %d/%d bins\n"
msgstr ""
#: gmon_io.c:511
#: gmon_io.c:547
msgid "time is in ticks, not seconds\n"
msgstr ""
#: gmon_io.c:517 gmon_io.c:704
#: gmon_io.c:553 gmon_io.c:742
#, c-format
msgid "%s: don't know how to deal with file format %d\n"
msgstr ""
#: gmon_io.c:524
#: gmon_io.c:560
#, c-format
msgid "File `%s' (version %d) contains:\n"
msgstr ""
#: gmon_io.c:527
#: gmon_io.c:563
#, c-format
msgid "\t%d histogram record\n"
msgstr ""
#: gmon_io.c:528
#: gmon_io.c:564
#, c-format
msgid "\t%d histogram records\n"
msgstr ""
#: gmon_io.c:530
#: gmon_io.c:566
#, c-format
msgid "\t%d call-graph record\n"
msgstr ""
#: gmon_io.c:531
#: gmon_io.c:567
#, c-format
msgid "\t%d call-graph records\n"
msgstr ""
#: gmon_io.c:533
#: gmon_io.c:569
#, c-format
msgid "\t%d basic-block count record\n"
msgstr ""
#: gmon_io.c:534
#: gmon_io.c:570
#, c-format
msgid "\t%d basic-block count records\n"
msgstr ""
#: gprof.c:147
#: gprof.c:163
#, c-format
msgid ""
"Usage: %s [-[abcDhilLsTvwxyz]] [-[ACeEfFJnNOpPqQZ][name]] [-I dirs]\n"
@ -355,119 +357,119 @@ msgid ""
"\t[image-file] [profile-file...]\n"
msgstr ""
#: gprof.c:163
#: gprof.c:179
#, c-format
msgid "Report bugs to %s\n"
msgstr ""
#: gprof.c:235
#: gprof.c:253
#, c-format
msgid "%s: debugging not supported; -d ignored\n"
msgstr ""
#: gprof.c:315
#: gprof.c:333
#, c-format
msgid "%s: unknown file format %s\n"
msgstr ""
#. This output is intended to follow the GNU standards document.
#: gprof.c:399
#: gprof.c:417
#, c-format
msgid "GNU gprof %s\n"
msgstr ""
#: gprof.c:400
#: gprof.c:418
msgid ""
"Based on BSD gprof, copyright 1983 Regents of the University of California.\n"
msgstr ""
#: gprof.c:401
#: gprof.c:419
msgid ""
"This program is free software. This program has absolutely no warranty.\n"
msgstr ""
#: gprof.c:442
#: gprof.c:460
#, c-format
msgid "%s: unknown demangling style `%s'\n"
msgstr ""
#: gprof.c:462
#: gprof.c:480
#, c-format
msgid ""
"%s: Only one of --function-ordering and --file-ordering may be specified.\n"
msgstr ""
#: gprof.c:562
#: gprof.c:578
#, c-format
msgid "%s: sorry, file format `prof' is not yet supported\n"
msgstr ""
#: gprof.c:623
#: gprof.c:639
#, c-format
msgid "%s: gmon.out file is missing histogram\n"
msgstr ""
#: gprof.c:630
#: gprof.c:646
#, c-format
msgid "%s: gmon.out file is missing call-graph data\n"
msgstr ""
#: hist.c:122
#: hist.c:127
#, c-format
msgid "%s: `%s' is incompatible with first gmon file\n"
msgstr ""
#: hist.c:138
#: hist.c:143
#, c-format
msgid "%s: %s: unexpected EOF after reading %d of %d samples\n"
msgstr ""
#: hist.c:351
#: hist.c:359
#, c-format
msgid "%c%c/call"
msgstr ""
#: hist.c:359
#: hist.c:367
#, c-format
msgid ""
" for %.2f%% of %.2f %s\n"
"\n"
msgstr ""
#: hist.c:365
#: hist.c:373
#, c-format
msgid ""
"\n"
"Each sample counts as %g %s.\n"
msgstr ""
#: hist.c:370
#: hist.c:378
msgid ""
" no time accumulated\n"
"\n"
msgstr ""
#: hist.c:377
#: hist.c:385
msgid "cumulative"
msgstr ""
#: hist.c:377
#: hist.c:385
msgid "self "
msgstr ""
#: hist.c:377
#: hist.c:385
msgid "total "
msgstr ""
#: hist.c:380
#: hist.c:388
msgid "time"
msgstr ""
#: hist.c:380
#: hist.c:388
msgid "calls"
msgstr ""
#: hist.c:469
#: hist.c:481
msgid ""
"\n"
"\n"
@ -475,31 +477,31 @@ msgid ""
"flat profile:\n"
msgstr ""
#: hist.c:475
#: hist.c:487
msgid "Flat profile:\n"
msgstr ""
#: mips.c:75
#: mips.c:85
#, c-format
msgid "[find_call] 0x%lx: jal"
msgstr ""
#: mips.c:100
#: mips.c:110
#, c-format
msgid "[find_call] 0x%lx: jalr\n"
msgstr ""
#: source.c:163
#: source.c:166
#, c-format
msgid "%s: could not locate `%s'\n"
msgstr ""
#: source.c:238
#: source.c:241
#, c-format
msgid "*** File %s:\n"
msgstr ""
#: utils.c:96
#: utils.c:109
#, c-format
msgid " <cycle %d>"
msgstr ""

View File

@ -1,3 +1,11 @@
2002-10-28 Daniel Jacobowitz <drow@mvista.com>
Merge from mainline:
2002-10-24 Nathan Tallent <eraxxon@alumni.rice.edu>
* ansidecl.h (__STDC__): Add (__alpha && __cplusplus) to the
list of platform compilers that may look, smell and act
like __STDC__ but that may not define it.
2002-09-23 Daniel Jacobowitz <drow@mvista.com>
Merge from mainline:

View File

@ -136,10 +136,13 @@ So instead we use the macro below and test it against specific values. */
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
#endif /* GCC_VERSION */
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32)
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32) || (defined(__alpha) && defined(__cplusplus))
/* All known AIX compilers implement these things (but don't always
define __STDC__). The RISC/OS MIPS compiler defines these things
in SVR4 mode, but does not define __STDC__. */
/* eraxxon@alumni.rice.edu: The Compaq C++ compiler, unlike many other
C++ compilers, does not define __STDC__, though it acts as if this
was so. (Verified versions: 5.7, 6.2, 6.3, 6.5) */
#define ANSI_PROTOTYPES 1
#define PTR void *

View File

@ -0,0 +1,50 @@
/* coff information for Texas Instruments TMS320C3X
Copyright 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define L_LNNO_SIZE 4
#include "coff/external.h"
#define TIC30MAGIC 0xC000
#define TIC30BADMAG(x) (((x).f_magic != TIC30MAGIC))
/********************** RELOCATION DIRECTIVES **********************/
/* The external reloc has an offset field, because some of the reloc
types on the z8k don't have room in the instruction for the entire
offset - eg with segments */
struct external_reloc
{
char r_vaddr[4];
char r_symndx[4];
char r_offset[4];
char r_type[2];
char r_stuff[2];
};
#define RELOC struct external_reloc
#define RELSZ 16
/* TMS320C30 relocation types. */
#define R_TIC30_ABS16 0x100 /* 16 bit absolute. */
#define R_TIC30_ABS24 0x101 /* 24 bit absolute. */
#define R_TIC30_ABS32 0x102 /* 32 bit absolute. */
#define R_TIC30_LDP 0x103 /* LDP bits 23-16 to 7-0. */
#define R_TIC30_PC16 0x104 /* 16 bit pc relative. */

View File

@ -1,3 +1,111 @@
2002-11-27 David O'Brien <obrien@FreeBSD.org>
* configure.host: Fix generic FreeBSD configuration entry.
2002-11-20 Alan Modra <amodra@bigpond.net.au>
* emulparams/elf64ppc.sh (DATA_ADDR): Don't define.
2002-10-30 Daniel Jacobowitz <drow@mvista.com>
* ld.1: Regenerated.
* ldgram.c: Regenerated.
* po/ld.pot: Regenerated.
2002-10-29 Daniel Jacobowitz <drow@mvista.com>
* emultempl/aix.em: Use include <> for generated headers.
* emultempl/beos.em: Likewise.
* emultempl/elf32.em: Likewise.
* emultempl/pe.em: Likewise.
* ldctor.c: Likewise.
* ldexp.c: Likewise.
* ldfile.c: Likewise.
* ldlang.c: Likewise.
* ldlex.c: Likewise.
* ldlex.l: Likewise.
* ldmain.c: Likewise.
* ldmisc.c: Likewise.
* ldwrite.c: Likewise.
* lexsup.c: Likewise.
* mri.c: Likewise.
* pe-dll.c: Likewise.
2002-10-28 Daniel Jacobowitz <drow@mvista.com>
Merge from mainline:
2002-10-23 Jakub Jelinek <jakub@redhat.com>
* emultempl/elf32.em (place_orphan): Don't put non-allocated .rel*
sections into .rel{,a}.dyn.
2002-10-21 Danny Smith <dannysmith@users.sourceforeg.net>
* scripttempl/pe.sc (__RUNTIME_PSEUDO_RELOC_LIST__,
__RUNTIME_PSEUDO_RELOC_LIST_END__): Add only when relocating.
2002-10-16 Jakub Jelinek <jakub@redhat.com>
* configure.tgt (s390x-*-linux*): Add elf_s390 emulation.
(s390-*-linux*): Add elf64_s390 emulation if want64.
* emulparams/elf64_sparc.sh (LIB_PATH): Update to match 2002-05-22
genscript.sh changes.
* emulparams/elf_x86_64.sh (LIB_PATH): Likewise.
* emulparams/elf64_s390.sh (LIB_PATH): Set up native 64 bit dirs.
2002-10-10 Jakub Jelinek <jakub@redhat.com>
* ldfile.c (ldfile_try_open_bfd): When searching skip linker scripts if
they have OUTPUT_FORMAT not matching actual output format.
* ldlang.c (lang_get_output_target): New function.
(open_output): Use it.
* ldlang.h (lang_get_output_target): New prototype.
2002-10-07 Ralf Habacker <Ralf.Habacker@freenet.de>
* pe-dll.cc (autofilter_symbolprefixlist): Don't re-export
auto-import symbols.
(make_one): Create _nm_<symbol> for data only.
2002-10-10 Alan Modra <amodra@bigpond.net.au>
* emultempl/elf32.em (output_rel_find): Prefer .rel script sections
when orphan is .rel, .rela when orphan is .rela.
(gld${EMULATION_NAME}_place_orphan): Handle combreloc .rel* case
first. Remove outsecname var.
2002-09-30 Alan Modra <amodra@bigpond.net.au>
* scripttempl/elfd30v.sc: Order reloc sections placing .plt last.
* scripttempl/elfm68hc11.sc: Likewise.
* scripttempl/elfm68hc12.sc: Likewise.
* emultempl/elf32.em (output_rel_find): Always place orphan loadable
reloc sections just before .rel.plt/.rela.plt.
(gld${EMULATION_NAME}_place_orphan <.rel>): Remove combreloc code.
Only put loadable reloc sections in hold_rel.
2002-09-29 H.J. Lu <hjl@gnu.org>
* emulparams/elf32ppc.sh (OTHER_GOT_RELOC_SECTIONS): New.
2002-08-27 Egor Duda <deo@logos-m.ru>
* scripttempl/pe.sc: Handle .rdata_runtime_pseudo_reloc sections.
Add symbols for application to access them.
2002-10-15 Alan Modra <amodra@bigpond.net.au>
* ldlang.c (load_symbols): Revert last change.
2002-10-14 Alan Modra <amodra@bigpond.net.au>
* ldlang.c (load_symbols): Don't call bfd_link_add_symbols when
just_syms_flag.
(lang_reasonable_defaults): Don't compare against false.
(size_input_section): Likewise.
(lang_size_sections_1): Likewise.
(lang_do_assignments): Likewise.
(lang_add_output): Likewise.
2002-10-11 Alan Modra <amodra@bigpond.net.au>
* pe-dll.c (make_import_fixup_mark): Avoid type-punned pointer.
* ldgram.y (memory_spec): Provide empty action.
(section <NAME>): Likewise.
2002-10-02 Alan Modra <amodra@bigpond.net.au>
* emulparams/elf64ppc.sh (MAXPAGESIZE): Set to 0x10000.

View File

@ -25,7 +25,7 @@ case "${host}" in
# Older versions of gcc do not use a specs file. In those cases,
# gcc -print-file-name=specs will simply print specs. We create a
# dummy specs files to handle this.
echo "-dynamic-linker `${CC} --print-file-name=ld-elf.so.1`" > specs
echo "-dynamic-linker `${CC} --print-prog-name=ld-elf.so.1`" > specs
HOSTING_CRT0='-dynamic-linker `${CC} --print-file-name=ld-elf.so.1` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `${CC} --print-file-name=crtbegin.o`'
HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
;;

View File

@ -491,8 +491,16 @@ fr30-*-*) targ_emul=elf32fr30 ;;
mcore-*-pe) targ_emul=mcorepe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
mcore-*-elf) targ_emul=elf32mcore ;;
s390x-*-linux*) targ_emul=elf64_s390 ;;
s390-*-linux*) targ_emul=elf_s390 ;;
s390x-*-linux*) targ_emul=elf64_s390
targ_extra_emuls=elf_s390
targ_extra_libpath=$targ_extra_emuls
tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
s390-*-linux*) targ_emul=elf_s390
if test "${want64}" = "true"; then
targ_extra_emuls=elf64_s390
targ_extra_libpath=$targ_extra_emuls
tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'`
fi ;;
*-*-ieee*) targ_emul=vanilla ;;
*)

View File

@ -17,6 +17,10 @@ OTHER_READWRITE_SECTIONS="
.got1 ${RELOCATING-0} : { *(.got1) }
.got2 ${RELOCATING-0} : { *(.got2) }
"
OTHER_GOT_RELOC_SECTIONS="
.rela.got1 ${RELOCATING-0} : { *(.rela.got1) }
.rela.got2 ${RELOCATING-0} : { *(.rela.got2) }
"
# Treat a host that matches the target with the possible exception of "64"
# in the name as if it were native.

View File

@ -9,3 +9,33 @@ MACHINE=
NOP=0x07070707
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
# Treat a host that matches the target with the possible exception of "x"
# in the name as if it were native.
if test `echo "$host" | sed -e s/390x/390/` \
= `echo "$target" | sed -e s/390x/390/`; then
case " $EMULATION_LIBPATH " in
*" ${EMULATION_NAME} "*)
LIB_PATH=${libdir}
for lib in ${NATIVE_LIB_DIRS}; do
case :${LIB_PATH}: in
*:${lib}:*) ;;
*) LIB_PATH=${LIB_PATH}:${lib} ;;
esac
done
case "$target" in
s390*-linux*)
suffix=64 ;;
esac
# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first
# on Linux.
if [ -n "$suffix" ]; then
case "$EMULATION_NAME" in
*64*)
LIB_PATH=`echo ${LIB_PATH}: | sed -e s,:,$suffix:,g`$LIB_PATH ;;
esac
fi ;;
esac
fi

Some files were not shown because too many files have changed in this diff Show More