public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: William Tambe <tambewilliam@gmail.com>,
	Binutils <binutils@sourceware.org>
Subject: Re: ld -shared support
Date: Mon, 02 Mar 2020 17:28:00 -0000	[thread overview]
Message-ID: <9213506d-2b50-d036-c366-3843bfea8fa0@redhat.com> (raw)
In-Reply-To: <CAF8i9mMMdAUCaZUtMoH4np3AHB8a7c2G_zp8V6h2vxRnPEY00w@mail.gmail.com>

Hi William,

> Can anyone describe the meaning of enabling the following macros ?
> 
> #define elf_backend_rela_normal
> #define elf_backend_can_refcount
> #define elf_backend_plt_readonly
> #define elf_backend_want_got_sym
> #define elf_backend_want_plt_sym
> #define elf_backend_want_dynrelro
> #define elf_backend_got_header_size
> #define elf_backend_want_got_plt
> 

Sadly internal documentation for the binutils is sadly lacking.
The best method is to look for how these macros are used in the
code itself.

So for example elf_backend_rela_normal is used in bfd/elflink.c
to determine is the addend in RELA type relocs should be adjusted 
when performing a relocatable link.  Most backends set the default
for this field to 1, but there are some that do not.  In order to
decide what to do, you need to consult the ABI for your architecture.
If you are actually creating the ABI, then you get to choose, and
probably going with the majority of other ports - and setting the
value to 1 - will be a good idea.

You can perform similar investigations for the other macros.
If you are having trouble understanding their operation howrver
please do feel free to post to this list again.

Cheers
  Nick


      reply	other threads:[~2020-03-02 17:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-23  4:02 William Tambe
2020-02-23 20:44 ` William Tambe
2020-02-25 17:14   ` William Tambe
2020-02-27 13:24     ` William Tambe
2020-03-02 17:28       ` 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=9213506d-2b50-d036-c366-3843bfea8fa0@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=tambewilliam@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).