From: Ian Lance Taylor <iant@google.com>
To: Jiong WANG <wong.kwongyuan@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: [GOLD] How can I add a undefined symbol in target implementation, not by "-u SYM" from command line ?
Date: Mon, 13 Aug 2012 15:39:00 -0000 [thread overview]
Message-ID: <CAKOQZ8zNPOZPa1wxVT4ddoMT9MnMngc0KD+utdUB-MFP3X_89g@mail.gmail.com> (raw)
In-Reply-To: <CA++uP6PDeCNCXwkwLXZEVE8tPsHUOGJH7MsCkK8nefUwqnBtmA@mail.gmail.com>
On Mon, Aug 13, 2012 at 3:25 AM, Jiong WANG <wong.kwongyuan@gmail.com> wrote:
>
> How can I predefine a undefined symbol in target implementation?
>
> actually, I am porting gold for tilegx, and our arch's tls
> implementation requires predefiniation of "_tls_get_addr" because the
> assembler generate relocation which use this symbol implicitly.
>
> I know there are interfaces, "define_in_output_data/segment" to
> predefined symbol with value, but there is no interface to predefine
> "undefined" symbol ?
>
> gold linker do support this by command line "-u SYMBOL", but it's
> a compile time decision not link time.
>
> currently, I managed to support this by the following ugly code:
>
> options::parse_set(NULL, "_tls_get_addr",
> (gold::options::String_set*)¶meters->options().undefined());
>
> which is bad, so, could anyone give me some suggestion on this?
I assume that the symbol is defined somewhere. You probably want to
add a do_is_defined_by_abi method to your Target. See the examples in
existing targets.
Ian
next prev parent reply other threads:[~2012-08-13 15:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-13 10:51 Jiong WANG
2012-08-13 14:11 ` Jiong WANG
2012-08-13 15:39 ` Ian Lance Taylor [this message]
2012-08-14 3:39 ` Jiong WANG
2012-08-14 4:54 ` Ian Lance Taylor
2012-08-14 5:26 ` WANG.Jiong
2012-08-14 5:35 ` Ian Lance Taylor
2012-08-14 6:34 ` WANG.Jiong
2012-08-17 3:54 ` [GOLD] Where can I found other target's test result? WANG.Jiong
2012-08-17 6:29 ` Ian Lance Taylor
2012-08-17 9:32 ` Jiong WANG
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=CAKOQZ8zNPOZPa1wxVT4ddoMT9MnMngc0KD+utdUB-MFP3X_89g@mail.gmail.com \
--to=iant@google.com \
--cc=binutils@sourceware.org \
--cc=wong.kwongyuan@gmail.com \
/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).