Age | Commit message (Collapse) | Author | Files | Lines |
|
what symbols are section symbols.
|
|
machine types.
(bfd_hppa_arch): Link in both PA1.0 and PA1.1 architecture info
structures.
* libhppa.h (enum pa_arch): New enumeration to describe the
different variants of the PA architecture.
* som.c (som_object_setup): Use new enumeration to set machine
type.
(som_finish_writing): If the machine type is PA1.1, then use the
PA1.1 machine identifier in the output file.
|
|
braindamaged HP OSF1 linker.
(setup_sections): Don't forget to free subspace_sections if we get
an error.
(som_slurp_string_table): Allocate strings on this bfd's obstack
rather than directly out of the heap.
(som_slurp_symbol_table): Likewise for the saved copy of the
canonical symbols.
(som_slurp_reloc_table): Likewise for the saved copy of the
canonical relocations. Free the native relocations when we're
done with them.
|
|
entry and flags fields are switched in the exec header.
|
|
|
|
correspond to subspaces.
|
|
total_subspaces when writing the unloadable subspaces.
|
|
bss-like sections.
(som_get_section_contents): Likewise.
(som_set_section_contents): Likewise.
|
|
sections.
|
|
* som.c (som_write_symbol_strings): Use "stringtab_offset"
rather than destroying the "name" field in the BFD symbol.
(som_build_and_write_symbol_table): Likewise.
|
|
'T' and 'U' to grab all the unwind information.
(som_set_reloc_info): Make 'U' unwind bits persist across
multiple SOM relocations. Set the addend field of an R_ENTRY
relocation to the value in 'T'; set the addend field on an
R_EXIT relocation to the value in 'U'.
|
|
* som.c (som_write_fixups): For R_ENTRY fixups, get 32bits of
unwind information from the addend field of the R_ENTRY, get the
other 32bits from the addend field of the R_EXIT.
(bfd_som_attach_unwind_info): Delete function and all references.
|
|
* som.c (bfd_section_from_som_symbol): Use bfd_abs_section_ptr
instead of &bfd_abs_section.
|
|
switched in executables created by the OSF1 linker.
(som_write_fixups): Handle R_EXIT just like the R_{F,L,R}SEL
fixups. Support R_ALT_ENTRY (handle just like R_EXIT).
|
|
R_NO_RELOCATION fixups.
(bfd_section_from_som_symbol): Return the absolute section if the
symbol isn't contained in any section in the output file.
(som_slurp_symbol_table): ST_PRI_PROG and ST_SEC_PROG symbols are
not function symbols (they are magic code labels which *can* be the
targets of cross space branches). $START$ is not a section symbol.
|
|
|
|
* config/hppabsd.mh (RANLIB): Likewise.
|
|
unwind descriptor information is available.
|
|
allocate and attach an exec header to the BFD private data.
(som_begin_writing): Don't fill fields of the exec header based
on BFD private data here (like the exec flags). Do not write
the exec header here.
(som_write_headers): Instead do it here.
* som.h (struct somdata): New field "exec_hdr" for the executable
file header.
(obj_som_exec_hdr): New accessor macro.
|
|
all uses of bfd_target * to be const bfd_target *. Change
bfd_target_vector and bfd_default_vector arrays to be const
bfd_target * const *.
|
|
or HIUX_AUX_ID.
(som_begin_writing): Use EXEC_AUX_ID instead of HPUX_AUX_ID.
(som_write_armap): Use CPU_PA_RISC1_0 as the magic number. Note
som.c is careful to always define CPU_PA_RISC1_0.
|
|
bfd data has not been copied yet.
(som_write_headers): Instead do it here.
|
|
for SOM fixups which are never passed to BFD.
|
|
(som_reloc_queue_find): Call memcmp instead of bcmp.
(som_bfd_reloc_type_lookup): Change first argument to bfd *.
(compare_syms): Change types of arguments to const void *.
(bfd_section_from_som_symbol): Removed unused local found.
(som_write_armap): Add elength, map, orl_count and int arguments.
(som_write_armap): Use %ld and cast to long for getuid result.
|
|
* elf32-hppa.c (hppa_elf_gen_reloc_type): Handle absolute calls.
* som.h (R_HPPA_ABS_CALL): Define.
* som.c (hppa_som_gen_reloc_type): Delete complex relocation types.
|
|
one relocation for any non-bss section.
|
|
|
|
Removed _bfd_debug_info_start, _bfd_debug_info_end and
_bfd_debug_info_accumulate, which were never used.
(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
rather than the single JUMP_TABLE macro. Removed many of the
weird macro definitions needed to support the monolithic
JUMP_TABLE.
* bfd-in.h (JUMP_TABLE): Removed.
* libbfd-in.h: Define a bunch of macros, and declare a few
functions, for use with the new BFD_JUMP_TABLE_* macros.
* libbfd.c (_bfd_dummy_new_section_hook): Removed.
(bfd_false): Set bfd_error_invalid_operation.
(bfd_nullvoidptr): Likewise.
(bfd_n1): New function.
(_bfd_nocore_core_file_matches_executable_p): Renamed from
_bfd_dummy_core_file_matches_executable_p.
(_bfd_nocore_core_file_failing_command): Similar rename. Set
bfd_error_invalid_operation.
(_bfd_nocore_core_file_failing_signal): Likewise.
(_bfd_generic_get_section_contents): Renamed from
bfd_generic_get_section_contents. Changed all callers.
(_bfd_generic_set_section_contents): Similar rename.
* ieee.c: #if 0 out ieee_bfd_debug_info_start,
ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
were never called.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
|
|
* som.c (som_object_setup): Set DYNAMIC flag for SHL_MAGIC and
DL_MAGIC objects.
(som_prep_headers): Preserve the system_id for DYNAMIC objects.
Use SHL_MAGIC as the magic number of the DYNAMIC flag is set.
Write exec headers for DYNAMIC objects.
(som_begin_writing): DYNAMIC objects have the same alignment
restrictions as D_PAGED objects.
(bfd_section_from_som_symbol): Treat DYNAMIC objects like EXEC_P
objects.
(object_flags): Add DYNAMIC.
|
|
Don't free anything if we don't have a bfd_object.
(som_close_and_cleanup): Call som_bfd_free_cached_info.
|
|
section->relocation is NULL; malloc might have returned NULL when
given a zero size if there were no relocations.
* bout.c (b_out_canonicalize_reloc): Likewise.
* coffcode.h (coff_canonicalize_reloc): Likewise.
* ecoff.c (ecoff_canonicalize_reloc): Likewise.
* elfcode.h (elf_canonicalize_reloc): Likewise.
* mipsbsd.c (MY(canonicalize_reloc)): Likewise.
* i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise.
* nlmcode.h (nlm_canonicalize_reloc): Likewise.
* som.c (som_canonicalize_reloc): Likewise.
* hp300hpux.c (MY(slurp_reloc_table)): Likewise. Also, if malloc
returns NULL, don't report an error if we asked for zero bytes.
* i386lynx.c (NAME(lynx,slurp_reloc_table)): If malloc returns
NULL, don't report an error if we asked for zero bytes.
* nlmcode.h (nlm_slurp_reloc_fixups): Likewise.
|
|
for the cached copy of the native string table.
(som_slurp_symbol_table): Likewise for the native symbol table.
(som_slurp_reloc_table): Likewise for the native and generic
relocation tables.
(som_bfd_free_cached_info): Free the cached native strings,
symbols, and relocations. Also free the canonical cached relocations.
|
|
* bfd.c (bfd_free_cached_info): Define.
* bfd-in.h (JUMP_TABLE): Add _bfd_free_cached_info.
* bfd-in2.h: Rebuilt.
* All backends: Initialize bfd_free_cached_info entry point to
bfd_true.
|
|
in executables left by the HP linker. Does not rely on subspace
alignments as subspaces are *NOT* guaranteed to be properly
aligned in an executable (can you believe that!).
|
|
Changes to let BFD return an error indication from
get_symtab_upper_bound, bfd_canonicalize_symtab,
bfd_get_reloc_upper_bound, and bfd_canonicalize_reloc. They now
return long instead of unsigned int, and use -1 to indicate an
error. Along the way, rename get_symtab_upper_bound to
bfd_get_symtab_upper_bound.
* bfd.c (bfd_get_reloc_upper_bound): Return long, and -1 on
errors.
(bfd_canonicalize_reloc): Likewise.
* syms.c (bfd_get_symtab_upper_bound): Renamed from
get_symtab_upper_bound.
* targets.c (bfd_target): Renamed _get_symtab_upper_bound to
_bfd_get_symtab_upper_bound, and changed it and
_bfd_canonicalize_symtab and _get_reloc_upper_bound and
_bfd_canonicalize_reloc to all return long.
* aoutx.h (NAME(aout,get_symtab)): Return long, and -1 on errors.
(NAME(aout,canonicalize_reloc)): Likewise.
(NAME(aout,get_reloc_upper_bound)): Likewise.
(NAME(aout,get_symtab_upper_bound)): Likewise.
* bout.c (b_out_canonicalize_reloc): Likewise.
(b_out_get_reloc_upper_bound): Likewise.
* coffcode.h (coff_canonicalize_reloc): Likewise.
* coffgen.c (coff_get_symtab_upper_bound): Likewise.
(coff_get_symtab): Likewise.
(coff_get_reloc_upper_bound): Likewise.
* ecoff.c (ecoff_get_symtab_upper_bound): Likewise.
(ecoff_get_symtab): Likewise.
(ecoff_canonicalize_reloc): Likewise.
* elfcode.h (elf_get_symtab_upper_bound): Likewise.
(elf_get_reloc_upper_bound): Likewise.
(elf_canonicalize_reloc): Likewise.
(elf_get_symtab): Likewise.
* hp300hpux.c (MY(get_symtab)): Likewise.
(MY(get_symtab_upper_bound)): Likewise.
(MY(canonicalize_reloc)): Likewise.
* i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise.
* ieee.c (ieee_slurp_external_symbols): Change return type to
boolean. Check for errors from get_symbol.
(ieee_slurp_symbol_table): Change return type to boolean. Check
for errors from ieee_slurp_external_symbols.
(ieee_get_symtab_upper_bound): Return long, and -1 on errors.
(ieee_get_symtab): Likewise.
(ieee_get_reloc_upper_bound): Likewise.
(ieee_canonicalize_reloc): Likewise.
* mipsbsd.c (MY(canonicalize_reloc)): Likewise.
* nlmcode.h (nlm_get_symtab_upper_bound): Likewise.
(nlm_get_symtab): Likewise.
(nlm_get_reloc_upper_bound): Likewise.
(nlm_canonicalize_reloc): Likewise.
* oasys.c (oasys_get_symtab_upper_bound): Likewise.
(oasys_get_symtab): Likewise.
(oasys_get_reloc_upper_bound): Likewise.
(oasys_canonicalize_reloc): Likewise.
* som.c (som_get_symtab_upper_bound): Likewise.
(som_get_symtab): Likewise.
(som_get_reloc_upper_bound): Likewise.
(som_canonicalize_reloc): Likewise.
* srec.c (srec_get_symtab_upper_bound): Likewise.
(srec_get_symtab): Likewise.
(srec_get_reloc_upper_bound): Define as bfd_0l.
(srec_canonicalize_reloc): Likewise.
* tekhex.c (tekhex_get_symtab): Return long, and -1 on errors.
(tekhex_get_symtab_upper_bound): Likewise.
(tekhex_get_reloc_upper_bound): Define as bfd_0l.
(tekhex_canonicalize_reloc): Likewise.
* libaout.h (NAME(aout,get_symtab_upper_bound)): Change
declaration to return long.
(NAME(aout,get_symtab)): Likewise.
(NAME(aout,canonicalize_reloc)): Likewise.
(NAME(aout,get_reloc_upper_bound)): Likewise.
* libcoff-in.h (coff_get_symtab_upper_bound): Likewise.
(coff_get_symtab): Likewise.
(coff_get_reloc_upper_bound): Likewise.
* libecoff.h (ecoff_get_symtab_upper_bound): Likewise.
(ecoff_get_symtab): Likewise.
(ecoff_canonicalize_reloc): Likewise.
* libelf.h (bfd_elf32_get_symtab_upper_bound): Likewise.
(bfd_elf32_get_symtab): Likewise.
(bfd_elf32_get_reloc_upper_bound): Likewise.
(bfd_elf32_canonicalize_reloc): Likewise.
(bfd_elf64_get_symtab_upper_bound): Likewise.
(bfd_elf64_get_symtab): Likewise.
(bfd_elf64_get_reloc_upper_bound): Likewise.
(bfd_elf64_canonicalize_reloc): Likewise.
* libnlm.h (nlmNAME(get_symtab_upper_bound)): Likewise.
(nlmNAME(get_symtab)): Likewise.
(nlmNAME(get_reloc_upper_bound)): Likewise.
(nlmNAME(canonicalize_reloc)): Likewise.
* archive.c (compute_and_write_armap): Use error_return and
no_memory_return labels rather than freeing information in various
places. Change storage, symcount and src_count to long. Check
errors from bfd_get_symtab_upper_bound and
bfd_canonicalize_symtab.
* bout.c (b_out_relax_section): Change reloc_size to long. Check
for errors from bfd_get_reloc_upper_bound and
bfd_canonicalize_reloc.
(b_out_get_relocated_section_contents): Likewise.
* coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
Likewise.
* elf32-mips.c: Likewise.
* elf32-hppa.c (hppa_elf_stub_finish): Likewise.
(hppa_look_for_stubs_in_section): Check for errors from
bfd_get_symtab_upper_bound, bfd_canonicalize_symtab, and
bfd_canonicalize_reloc.
* ecofflink.c (bfd_ecoff_debug_accumulate_other): Check for errors
from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
* linker.c (generic_link_read_symbols): Likewise.
(_bfd_generic_final_link): Check for errors from
bfd_get_reloc_upper_bound and bfd_canonicalize_reloc.
* reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
* reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
(bfd_coff_reloc16_get_relocated_section_contents): Likewise.
* libbfd.c (bfd_0l): New function.
* libbfd-in.h (bfd_0l): Declare.
* aix386-core.c: Change get_symtab_upper_bound, get_symtab,
get_reloc_upper_bound, and canonicalize_reloc to use bfd_0l rather
than bfd_0u.
* cisco-core.c, hppabsd-core.c, hpux-core.c: Likewise.
* irix-core.c, osf-core.c, ptrace-core.c, trad-core.c: Likewise.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
* libcoff.h: Rebuilt.
* nlm32-sparc.c (nlm_sparc_read_reloc): Remove unused variables
temp and name.
|
|
to actually read data from a section that doesn't have either
SEC_LOAD or SEC_DEBUGGING set (eg $BSS$) just return true.
|
|
read. (bfd_error_system_call or bfd_error_file_truncated).
* som.c: Do not blindly set bfd_error_system_call after a
failing bfd_read, bfd_write, or bfd_seek. In a few places
(like som_object_p) override the error status set by bfd_read.
* aix386-core.c, aout-encap,c archive.c, bout.c: Likewise.
* coff-rs6000.c, coffgen.c ecoff.c, elf.c: Likewise.
* elf32-hppa.c, elfcode.h, hp300hpux.c, i386lynx.c: Likewise.
* nlm32-alpha.c, nlm32-i386.c, nlm32-sparc.c: Likewise.
* som.c: Check return values from several bfd_{seek,read,write}
calls that we just assumed were not failing.
|
|
(som_bfd_ar_write_symbol_stuff, som_write_armap): Likewise.
|
|
comparison for function symbols within executables.
|
|
som_section_from_subspace_index. Pass in a native SOM symbol.
For executables, iterate through the sections to find out
which contains the symbol's address rather than using the
symbol_info field. (symbol_info has a different meaning for
dynamicly linked executables.)
|
|
space/subspace data was done unconditionally rather than
just for executables.)
|
|
make HPUX kernel happy. Fixes strip/objcopy for shared
executables.
|
|
subspaces too when writing executables. Never request a negative
bss size. Fixes some problems with demand paged executables,
still having problems with pure executables and shared executables.
|
|
containing all the private section information which needs
to be copied from input section to output section during
objcopy or strip.
(som_section_data_struct): Remove several fields now in
som_copyable_section_data_struct. Make the space and
subspace dictionaries be pointers (to save space when
only reading objects).
* som.c (bfd_som_set_section_attributes): Now returns a boolean;
some references changed. Allocate a copyable data stucture if
none exists. Store info into the copyable data structure.
(bfd_som_set_subsection_attributes): Likewise.
(som_is_space, som_is_subspace, som_is_container): New functions.
Use these instead of directly accessing private data.
(som_prep_headers): Allocate space and subspace headers here.
Fill in some fields in the space/subspace headers from the
copyable data.
(som_bfd_copy_private_section_data): Only copy the stuff
that we really need to make objcopy and strip work. Allocate
the copy_data structure for the output bfd before copying.
|
|
info that must be preserved when running objcopy/strip.
(struct somdata): Add new "exec_data" field and accessor
macro. Add some comments on how the various fields are used.
(som_section_data_struct): Make is_space and is_subspace bitfields.
Delete unused subspace_index. All references now use the
target_index field within the section structure itself.
* som.c (make_unique_section): Delete unused declaration.
(som_bfd_copy_private_bfd_data): New function.
(som_object_setup): Allocate space for and save exec information
that needs to be copied during objcopy/strip.
(som_mkobject): Do not allocate space for a file header here.
It is not used when only reading SOM objects.
(som_prep_headers): Allocate space for and attach a file header
to the output bfd. For executables, use the saved system_id
value rather than trying to guess the right value. Do not abort
wwhen setting file_hdr->entry* for executables.
(som_begin_writing): For executables, set the exec_entry and
exec_flags fields.
(som_copy_private_backend_section_data): Always return a value.
|
|
* som.c (SOM_ALIGN): Define.
(som_begin_writing): If writing an executable, initialize all
fields in the exec header to zero. Update fields in the exec
header as sizes of loadable subspaces are computed. Carefully
preserve alignments when building executables. Actually write the
exec after all the fields are filled in.
|
|
names, but doesn't quite write compliant extended names yet.
* som.c (som_slurp_extended_name_table): Delete function. The
generic code will handle things correctly.
(som_slurp_armap): Seek to the beginning of the next member.
(normalize): New function.
(som_bfd_ar_write_symbol_stuff): Take the size of the extended
name table into account when computing the file offsets in the
SOM dictionary. Make sure to align to an even boundary.
(som_write_armap): Initialize the checksum to zero.
(ar_maxchars): Fix. Opps.
|
|
elf32-hppa.c, elf32-mips.c, linker.c, som.c, sunos.c: If malloc(0)
returns NULL, it is not an error. It's possible that some of
these checks are not necessary (because the size can never be
zero), but putting in the checks is the conservative thing to do
in light of the fact that some of these malloc calls replaced
unchecked alloca calls, in which a zero argument would work fine.
|
|
* bfd-in.h (JUMP_TABLE): Add new entries to the jump table
for bfd_copy_private_section_data, bfd_copy_private_bfd_data,
and bfd_is_local_label.
* targets.c: Add new entries to the bfd_target structure.
* bfd.c (bfd_copy_private_bfd_data): New definition.
* section.c (bfd_copy_private_section_data): New definition.
* syms.c (bfd_is_local_label): New definition.
* libbfd-in.h (bfd_generic_is_local_label): Declare.
* libbfd.c (bfd_generic_is_local_label): New function.
* *-core.c: Provide default definitions for new functions in
the target vector which all point to bfd_false.
* aout-target.h, coffcode.h, elf32-target.h elf64-target.h, ieee.c
libaout.h, libecoff.h, nlm-target.h, oasys.c, srec.c, tekhex.c
Default new vectors for copying private backend data to bfd_true.
Default new vector for determining if a symbol is a local label
to bfd_generic_is_local_label.
* som.c (som_bfd_copy_private_section_data): New function.
(som_bfd_is_local_label): New function.
(som_bfd_copy_private_bfd_data): For now default to bfd_true.
* elf32-hppa.c (hppa_elf_is_local_label): New function.
|
|
symbol for the *ABS* section is really a relocation involving
no symbol.
(som_slurp_symbol_table): Do not set BSF_GLOBAL or BSF_EXPORT for
undefined symbols. Correctly distinguish between debugger symbols
and section symbols.
|