From 5b3577cb7a48ff1cda271f61465d66bcc3c38341 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 16 Mar 1994 07:02:05 +0000 Subject: * bfd-in2.h, libbfd.h, libcoff.h: Rebuilt. * 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. --- bfd/som.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'bfd/som.c') diff --git a/bfd/som.c b/bfd/som.c index d399e0f..c71b607 100644 --- a/bfd/som.c +++ b/bfd/som.c @@ -149,6 +149,9 @@ static asymbol * som_make_empty_symbol PARAMS ((bfd *)); static void som_print_symbol PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type)); static boolean som_new_section_hook PARAMS ((bfd *, asection *)); +static boolean som_bfd_copy_private_section_data PARAMS ((bfd *, asection *, + bfd *, asection *)); +static boolean som_bfd_is_local_label PARAMS ((bfd *, asymbol *)); static boolean som_set_section_contents PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type)); static boolean som_set_arch_mach PARAMS ((bfd *, enum bfd_architecture, @@ -3644,6 +3647,14 @@ som_print_symbol (ignore_abfd, afile, symbol, how) } } +static boolean +som_bfd_is_local_label (abfd, sym) + bfd *abfd; + asymbol *sym; +{ + return (sym->name[0] == 'L' && sym->name[1] == '$'); +} + /* Count or process variable-length SOM fixup records. To avoid code duplication we use this code both to compute the number @@ -4036,6 +4047,29 @@ som_new_section_hook (abfd, newsect) return true; } +/* Copy any private info we understand from the input section + to the output section. */ +static boolean +som_bfd_copy_private_section_data (ibfd, isection, obfd, osection) + bfd *ibfd; + asection *isection; + bfd *obfd; + asection *osection; +{ + /* One day we may try to grok other private data. */ + if (ibfd->xvec->flavour != bfd_target_som_flavour + || obfd->xvec->flavour != bfd_target_som_flavour) + return false; + + memcpy (som_section_data (osection), som_section_data (isection), + sizeof (struct som_section_data_struct)); + + /* Reparent if necessary. */ + if (som_section_data (osection)->containing_space) + som_section_data (osection)->containing_space = + som_section_data (osection)->containing_space->output_section; +} + /* Set backend info for sections which can not be described in the BFD data structures. */ @@ -5190,6 +5224,9 @@ som_slurp_extended_name_table (abfd) #define som_core_file_failing_signal _bfd_dummy_core_file_failing_signal #define som_core_file_matches_executable_p _bfd_dummy_core_file_matches_executable_p +#define som_bfd_copy_private_bfd_data \ + ((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true) + bfd_target som_vec = { "som", /* name */ -- cgit v1.1