From: Tristan Gingold <gingold@adacore.com>
To: Iain Sandoe <developer@sandoe-acoustics.co.uk>
Cc: binutils Development <binutils@sourceware.org>
Subject: Re: [Patch mach-o/bfd/gas] handle ABS indirect_symbols.
Date: Fri, 13 Jan 2012 08:17:00 -0000 [thread overview]
Message-ID: <370D64BD-03BF-4AC7-8BE4-37EC42266768@adacore.com> (raw)
In-Reply-To: <79D2A42E-1056-4ED2-B0C2-7E097C3844AE@sandoe-acoustics.co.uk>
On Jan 12, 2012, at 7:28 PM, Iain Sandoe wrote:
> a minor update to handle ABS symbols in the indirect symbol table.
> tests attached
>
> OK?
Ok.
Thanks,
Tristan.
> Iain
>
> bfd:
>
> * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle ABS symbols.
>
> gas:
>
> * config/obj-macho.c (obj_mach_o_set_indirect_symbols): Handle ABS symbols.
>
> bfd/mach-o.c | 3 +++
> gas/config/obj-macho.c | 10 +++++++---
> 2 files changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/bfd/mach-o.c b/bfd/mach-o.c
> index c519663..0846fe6 100644
> --- a/bfd/mach-o.c
> +++ b/bfd/mach-o.c
> @@ -2199,6 +2199,9 @@ bfd_mach_o_build_dysymtab_command (bfd *abfd,
> {
> if (isyms[j] == NULL)
> dsym->indirect_syms[n] = BFD_MACH_O_INDIRECT_SYM_LOCAL;
> + else if (isyms[j]->symbol.section == bfd_abs_section_ptr)
> + dsym->indirect_syms[n] = BFD_MACH_O_INDIRECT_SYM_LOCAL
> + | BFD_MACH_O_INDIRECT_SYM_ABS;
> else
> dsym->indirect_syms[n] = isyms[j]->symbol.udata.i;
> }
> diff --git a/gas/config/obj-macho.c b/gas/config/obj-macho.c
> index 61e6771..c381dbe 100644
> --- a/gas/config/obj-macho.c
> +++ b/gas/config/obj-macho.c
> @@ -1545,14 +1545,18 @@ obj_mach_o_set_indirect_symbols (bfd *abfd, asection *sec,
>
> for (isym = list, n = 0; isym != NULL; isym = isym->next, n++)
> {
> + sym = (bfd_mach_o_asymbol *)symbol_get_bfdsym (isym->sym);
> /* Array is init to NULL & NULL signals a local symbol
> If the section is lazy-bound, we need to keep the
> - reference to the symbol, since dyld can override. */
> - if (S_IS_LOCAL (isym->sym) && ! lazy)
> + reference to the symbol, since dyld can override.
> +
> + Absolute symbols are handled specially. */
> + if (sym->symbol.section == bfd_abs_section_ptr)
> + ms->indirect_syms[n] = sym;
> + else if (S_IS_LOCAL (isym->sym) && ! lazy)
> ;
> else
> {
> - sym = (bfd_mach_o_asymbol *)symbol_get_bfdsym (isym->sym);
> if (sym == NULL)
> ;
> /* If the symbols is external ... */
>
>
> <12011218-dysym-abs-test.txt>
>
>
next prev parent reply other threads:[~2012-01-13 8:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-12 18:29 Iain Sandoe
2012-01-13 8:17 ` Tristan Gingold [this message]
2012-01-13 13:12 ` Iain Sandoe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=370D64BD-03BF-4AC7-8BE4-37EC42266768@adacore.com \
--to=gingold@adacore.com \
--cc=binutils@sourceware.org \
--cc=developer@sandoe-acoustics.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).