version 1.1.1.5.2.2, 2020/04/08 14:04:46 |
version 1.1.1.6, 2018/11/06 21:19:02 |
|
|
/* ldcref.c -- output a cross reference table |
/* ldcref.c -- output a cross reference table |
Copyright (C) 1996-2020 Free Software Foundation, Inc. |
Copyright (C) 1996-2018 Free Software Foundation, Inc. |
Written by Ian Lance Taylor <ian@cygnus.com> |
Written by Ian Lance Taylor <ian@cygnus.com> |
|
|
This file is part of the GNU Binutils. |
This file is part of the GNU Binutils. |
|
|
#include "sysdep.h" |
#include "sysdep.h" |
#include "bfd.h" |
#include "bfd.h" |
#include "bfdlink.h" |
#include "bfdlink.h" |
#include "ctf-api.h" |
|
#include "libiberty.h" |
#include "libiberty.h" |
#include "demangle.h" |
#include "demangle.h" |
#include "objalloc.h" |
#include "objalloc.h" |
Line 575 check_nocrossref (struct cref_hash_entry |
|
Line 574 check_nocrossref (struct cref_hash_entry |
|
defsec = hl->u.def.section->output_section; |
defsec = hl->u.def.section->output_section; |
if (defsec == NULL) |
if (defsec == NULL) |
return TRUE; |
return TRUE; |
defsecname = bfd_section_name (defsec); |
defsecname = bfd_get_section_name (defsec->owner, defsec); |
|
|
for (ncrs = nocrossref_list; ncrs != NULL; ncrs = ncrs->next) |
for (ncrs = nocrossref_list; ncrs != NULL; ncrs = ncrs->next) |
for (ncr = ncrs->list; ncr != NULL; ncr = ncr->next) |
for (ncr = ncrs->list; ncr != NULL; ncr = ncr->next) |
Line 659 check_reloc_refs (bfd *abfd, asection *s |
|
Line 658 check_reloc_refs (bfd *abfd, asection *s |
|
arelent **p, **pend; |
arelent **p, **pend; |
|
|
outsec = sec->output_section; |
outsec = sec->output_section; |
outsecname = bfd_section_name (outsec); |
outsecname = bfd_get_section_name (outsec->owner, outsec); |
|
|
outdefsec = info->defsec->output_section; |
outdefsec = info->defsec->output_section; |
outdefsecname = bfd_section_name (outdefsec); |
outdefsecname = bfd_get_section_name (outdefsec->owner, outdefsec); |
|
|
/* The section where the symbol is defined is permitted. */ |
/* The section where the symbol is defined is permitted. */ |
if (strcmp (outsecname, outdefsecname) == 0) |
if (strcmp (outsecname, outdefsecname) == 0) |
Line 706 check_reloc_refs (bfd *abfd, asection *s |
|
Line 705 check_reloc_refs (bfd *abfd, asection *s |
|
if (q->sym_ptr_ptr != NULL |
if (q->sym_ptr_ptr != NULL |
&& *q->sym_ptr_ptr != NULL |
&& *q->sym_ptr_ptr != NULL |
&& ((global |
&& ((global |
&& (bfd_is_und_section (bfd_asymbol_section (*q->sym_ptr_ptr)) |
&& (bfd_is_und_section (bfd_get_section (*q->sym_ptr_ptr)) |
|| bfd_is_com_section (bfd_asymbol_section (*q->sym_ptr_ptr)) |
|| bfd_is_com_section (bfd_get_section (*q->sym_ptr_ptr)) |
|| ((*q->sym_ptr_ptr)->flags & (BSF_GLOBAL |
|| ((*q->sym_ptr_ptr)->flags & (BSF_GLOBAL |
| BSF_WEAK)) != 0)) |
| BSF_WEAK)) != 0)) |
|| (!global |
|| (!global |
&& ((*q->sym_ptr_ptr)->flags & (BSF_LOCAL |
&& ((*q->sym_ptr_ptr)->flags & (BSF_LOCAL |
| BSF_SECTION_SYM)) != 0 |
| BSF_SECTION_SYM)) != 0 |
&& bfd_asymbol_section (*q->sym_ptr_ptr) == info->defsec)) |
&& bfd_get_section (*q->sym_ptr_ptr) == info->defsec)) |
&& (symname != NULL |
&& (symname != NULL |
? strcmp (bfd_asymbol_name (*q->sym_ptr_ptr), symname) == 0 |
? strcmp (bfd_asymbol_name (*q->sym_ptr_ptr), symname) == 0 |
: ((*q->sym_ptr_ptr)->flags & BSF_SECTION_SYM) != 0)) |
: ((*q->sym_ptr_ptr)->flags & BSF_SECTION_SYM) != 0)) |