This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: PR 233: Check non-debug local references to discarded sections
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 30 Jun 2004 13:25:07 +0930
- Subject: Re: PATCH: PR 233: Check non-debug local references to discarded sections
- References: <20040629161316.GA752@lucon.org>
On Tue, Jun 29, 2004 at 09:13:16AM -0700, H. J. Lu wrote:
> @@ -6277,6 +6277,10 @@ elf_section_ignore_discarded_relocs (ase
> && (*bed->elf_backend_ignore_discarded_relocs) (sec))
> return TRUE;
>
> + /* Catch all .eh_frame sections. */
> + if (strcmp (sec->name, ".eh_frame") == 0)
> + return TRUE;
> +
> return FALSE;
> }
Huh? Why wasn't sec->sec_info_type == ELF_INFO_TYPE_EH_FRAME?
> @@ -6593,9 +6596,11 @@ elf_link_input_bfd (struct elf_final_lin
> else
> finfo->info->callbacks->error_handler
> (LD_DEFINITION_IN_DISCARDED_SECTION,
> - _("%T: discarded in section `%s' from %s\n"),
> + _("`%T' referenced in section `%s' from %s: discarded in section `%s' from %s\n"),
> h->root.root.string,
> h->root.root.string,
> + o->name,
> + bfd_archive_filename (o->owner),
> h->root.u.def.section->name,
> bfd_archive_filename (h->root.u.def.section->owner));
> }
You can't call bfd_archive_filename twice in the one error message,
as it uses a static buffer.
--
Alan Modra
IBM OzLabs - Linux Technology Centre