public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Noah yan <noah.yan@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: force symbol to local
Date: Tue, 18 Jul 2006 09:50:00 -0000	[thread overview]
Message-ID: <44BCAEF5.5010506@redhat.com> (raw)
In-Reply-To: <59521b110607171050k61ca9e86sca560a7673d67d55@mail.gmail.com>

Hi Noah,

> How can I force a symbol to be local when using "ld -r", 

The linker does not have this functionality but the objcopy program does.

> a typically use is that I have a lists of global symbol 
 > provided to the ld and want all else are local,

This is slightly tricker.  The easiest way would be to use the "nm" 
program to obtain the full list of global symbols in the object file(s) 
and then use a script to extract all the ones you want to keep as 
global.  Then use the "--localize-symbols" switch supported by objcopy 
to take the remaining symbols and convert them into local symbols.

Cheers
   Nick

      reply	other threads:[~2006-07-18  9:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-17 17:50 Noah yan
2006-07-18  9:50 ` Nick Clifton [this message]

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=44BCAEF5.5010506@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=noah.yan@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).