public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Renlin Li <renlin.li@foss.arm.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: Kyrill Tkachov <kyrylo.tkachov@arm.com>,
	Ramana Radhakrishnan <Ramana.Radhakrishnan@arm.com>
Subject: Re: [PING][PATCH][ARM]Use different startfile and endfile for elf target when generating shared object.
Date: Wed, 07 Jun 2017 16:41:00 -0000	[thread overview]
Message-ID: <59382CB7.5070808@foss.arm.com> (raw)
In-Reply-To: <58516631.7000008@foss.arm.com>

Ping ~

On 14/12/16 15:33, Renlin Li wrote:
> Ping~
>
> Regards,
> Renlin
>
> On 16/06/16 12:04, Renlin Li wrote:
>> Hi all,
>>
>> GCC has startfile and endfile spec string built into it.
>> startfile is used to specify objects files to include at the start of the link process.
>> While endfile, on the other hand, is used to specify objects files to include at the end
>> of the link process.
>>
>> crtbegin.o is one of the object files specified by startfile spec string. IIUC,
>> crtbeginS.o should be used in place of crtbegin.o when generating shared objects.
>> The same applies to crtend.o which is one of the endfile. crtendS.o should be used when
>> generating shared objects.
>>
>> This patch makes the change to use different crtbegin and crtend files when creating
>> shared and static object for elf toolchain. The linux toolchain already did this
>> differentiation.
>>
>> So when the toolchain doesn't support shared object, the following error message will be
>> produced:
>> ld: cannot find crtbeginS.o: No such file or directory
>>
>> Still, those specs strings built into GCC can be overridden by using
>> -specs=command-line switch to specify a spec file.
>>
>> arm-none-eabi regression test without new issues, OK for trunk?
>>
>> Regards,
>> Renlin Li
>>
>> gcc/ChangeLog:
>>
>> 2016-06-16  Renlin Li  <renlin.li@arm.com>
>>
>>      * config/arm/unknown-elf.h (UNKNOWN_ELF_STARTFILE_SPEC): Use
>>      crtbeginS.o for shared object.
>>      (UNKNOWN_ELF_ENDFILE_SPEC): Use crtendS.o for shared object.

  parent reply	other threads:[~2017-06-07 16:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 11:04 [PATCH][ARM]Use " Renlin Li
2016-12-14 15:34 ` [PING][PATCH][ARM]Use " Renlin Li
2017-01-12 11:24   ` Renlin Li
2017-06-07 16:41   ` Renlin Li [this message]
2017-01-12 11:47 ` [PATCH][ARM]Use " kugan
2017-01-12 15:50   ` Renlin Li
2017-01-13  8:48     ` Christophe Lyon
2017-01-13 10:22       ` Renlin Li
2017-01-13 11:14         ` Christophe Lyon
2017-01-13 12:26           ` Renlin Li
2017-01-13 12:45             ` Christophe Lyon

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=59382CB7.5070808@foss.arm.com \
    --to=renlin.li@foss.arm.com \
    --cc=Ramana.Radhakrishnan@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kyrylo.tkachov@arm.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).