diff options
author | Jakub Jelinek <jakub@redhat.com> | 2004-08-19 07:47:25 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2004-08-19 07:47:25 +0000 |
commit | 3f764659c7b9bc8eb30920d37a55d3371d649d8a (patch) | |
tree | 319fa09f77d6c7de8215382efe357fc6858dc5d0 /ld | |
parent | e5da76ecfd1f3bfccdd5b4781a97faa8ebf03a99 (diff) | |
download | gdb-3f764659c7b9bc8eb30920d37a55d3371d649d8a.zip gdb-3f764659c7b9bc8eb30920d37a55d3371d649d8a.tar.gz gdb-3f764659c7b9bc8eb30920d37a55d3371d649d8a.tar.bz2 |
* elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
entries (where fd_aux overlaps next entry's fd_func).
Add non_overlapping argument, use it.
(ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
ppc64_elf_size_stubs, ppc64_elf_relocate_section,
ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
as indexes into opd_sym_map/opd_adjust array.
* elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
* emultempl/ppc64elf.em (non_overlapping_opd): New variable.
(ppc_before_allocation): Pass it to ppc64_elf_edit_opd).
(OPTION_NON_OVERLAPPING_OPD): Define.
(PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Add
--non-overlapping-opd option.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 8 | ||||
-rw-r--r-- | ld/emultempl/ppc64elf.em | 15 |
2 files changed, 22 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index a8b8ba4..0bf150a 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,11 @@ +2004-08-19 Jakub Jelinek <jakub@redhat.com> + + * emultempl/ppc64elf.em (non_overlapping_opd): New variable. + (ppc_before_allocation): Pass it to ppc64_elf_edit_opd). + (OPTION_NON_OVERLAPPING_OPD): Define. + (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Add + --non-overlapping-opd option. + 2004-08-18 Alan Modra <amodra@bigpond.net.au> PR 338 diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em index 264d63e..094a4fb 100644 --- a/ld/emultempl/ppc64elf.em +++ b/ld/emultempl/ppc64elf.em @@ -51,6 +51,9 @@ static int emit_stub_syms = 0; static asection *toc_section = 0; +/* Whether to canonicalize .opd so that there are no overlapping + .opd entries. */ +static int non_overlapping_opd = 0; /* This is called before the input files are opened. We create a new fake input file to hold the stub sections. */ @@ -89,7 +92,7 @@ ppc_before_allocation (void) { if (stub_file != NULL) { - if (!ppc64_elf_edit_opd (output_bfd, &link_info)) + if (!ppc64_elf_edit_opd (output_bfd, &link_info, non_overlapping_opd)) { einfo ("%X%P: can not edit opd %E\n"); return; @@ -463,6 +466,7 @@ PARSE_AND_LIST_PROLOGUE=' #define OPTION_DOTSYMS (OPTION_STUBSYMS + 1) #define OPTION_NO_DOTSYMS (OPTION_DOTSYMS + 1) #define OPTION_NO_TLS_OPT (OPTION_NO_DOTSYMS + 1) +#define OPTION_NON_OVERLAPPING_OPD (OPTION_NO_TLS_OPT + 1) ' PARSE_AND_LIST_LONGOPTS=' @@ -471,6 +475,7 @@ PARSE_AND_LIST_LONGOPTS=' { "dotsyms", no_argument, NULL, OPTION_DOTSYMS }, { "no-dotsyms", no_argument, NULL, OPTION_NO_DOTSYMS }, { "no-tls-optimize", no_argument, NULL, OPTION_NO_TLS_OPT }, + { "non-overlapping-opd", no_argument, NULL, OPTION_NON_OVERLAPPING_OPD }, ' PARSE_AND_LIST_OPTIONS=' @@ -498,6 +503,10 @@ PARSE_AND_LIST_OPTIONS=' fprintf (file, _("\ --no-tls-optimize Don'\''t try to optimize TLS accesses.\n" )); + fprintf (file, _("\ + --non-overlapping-opd Canonicalize .opd, so that there are no overlapping\n\ + .opd entries.\n" + )); ' PARSE_AND_LIST_ARGS_CASES=' @@ -525,6 +534,10 @@ PARSE_AND_LIST_ARGS_CASES=' case OPTION_NO_TLS_OPT: notlsopt = 1; break; + + case OPTION_NON_OVERLAPPING_OPD: + non_overlapping_opd = 1; + break; ' # Put these extra ppc64elf routines in ld_${EMULATION_NAME}_emulation |