diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-03-10 04:53:55 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-03-10 04:53:55 +0000 |
commit | d88cc85dbbd2dbd9b4cc0aa9bd0bd8dc53aa8006 (patch) | |
tree | 5bf4977d6af0e581d06b2d28ed7913dde4501209 /gas/config/obj-elf.h | |
parent | d6bfcdb505ffd51bcf218362eee92fa7c779c86f (diff) | |
download | gdb-d88cc85dbbd2dbd9b4cc0aa9bd0bd8dc53aa8006.zip gdb-d88cc85dbbd2dbd9b4cc0aa9bd0bd8dc53aa8006.tar.gz gdb-d88cc85dbbd2dbd9b4cc0aa9bd0bd8dc53aa8006.tar.bz2 |
From Eric Youngdale <eric@andante.jic.com>:
* config/obj-elf.h (struct elf_obj_sy): Define.
(OBJ_SYMFIELD_TYPE): Define to elf_obj_sy struct. Change all
users.
* config/obj-elf.c (obj_elf_symver): Just record the name.
(obj_symbol_new_hook): Initialized versioned_name field.
(elf_frob_symbol): If there is a versioned_name, either rename the
symbol, or add an alias with that name.
Diffstat (limited to 'gas/config/obj-elf.h')
-rw-r--r-- | gas/config/obj-elf.h | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/gas/config/obj-elf.h b/gas/config/obj-elf.h index f6af69f..bd4d58c 100644 --- a/gas/config/obj-elf.h +++ b/gas/config/obj-elf.h @@ -1,5 +1,5 @@ /* ELF object file format. - Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc. + Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -34,9 +34,19 @@ #define BYTES_IN_WORD 4 /* for now */ #include "bfd/elf-bfd.h" -/* Use this to keep track of .size expressions that involve differences - that we can't compute yet. */ -#define OBJ_SYMFIELD_TYPE expressionS * +/* Additional information we keep for each symbol. */ + +struct elf_obj_sy +{ + /* Use this to keep track of .size expressions that involve + differences that we can't compute yet. */ + expressionS *size; + + /* The name specified by the .symver directive. */ + char *versioned_name; +}; + +#define OBJ_SYMFIELD_TYPE struct elf_obj_sy /* Symbol fields used by the ELF back end. */ #define ELF_TARGET_SYMBOL_FIELDS int local:1; @@ -65,13 +75,20 @@ extern void elf_begin PARAMS ((void)); #define S_SET_ALIGN(S,V) \ (elf_symbol ((S)->bsym)->internal_elf_sym.st_value = (V)) -extern asection *gdb_section; +#define S_GET_OTHER(S) (elf_symbol ((S)->bsym)->internal_elf_sym.st_other) +#define S_SET_OTHER(S,V) \ + (elf_symbol ((S)->bsym)->internal_elf_sym.st_other = (V)) -#define obj_frob_file() elf_frob_file() +extern asection *gdb_section; +#define obj_frob_file elf_frob_file extern void elf_frob_file PARAMS ((void)); -extern void elf_file_symbol PARAMS ((char *)); + +#define obj_frob_file_after_relocs elf_frob_file_after_relocs +extern void elf_frob_file_after_relocs PARAMS ((void)); + #define obj_app_file elf_file_symbol +extern void elf_file_symbol PARAMS ((char *)); extern void obj_elf_section PARAMS ((int)); extern void obj_elf_previous PARAMS ((int)); @@ -84,8 +101,13 @@ extern void obj_elf_version PARAMS ((int)); /* When setting one symbol equal to another, by default we probably want them to have the same "size", whatever it means in the current context. */ -#define OBJ_COPY_SYMBOL_ATTRIBUTES(DEST,SRC) \ - S_SET_SIZE ((DEST), S_GET_SIZE (SRC)) +#define OBJ_COPY_SYMBOL_ATTRIBUTES(DEST,SRC) \ +do \ + { \ + S_SET_SIZE ((DEST), S_GET_SIZE (SRC)); \ + S_SET_OTHER ((DEST), S_GET_OTHER (SRC)); \ + } \ +while (0) /* Stabs go in a separate section. */ #define SEPARATE_STAB_SECTIONS 1 |