From: Sudakshina Das <Sudi.Das@arm.com>
To: "H.J. Lu" <hjl.tools@gmail.com>,
"nickc@redhat.com" <nickc@redhat.com>,
Ramana Radhakrishnan <Ramana.Radhakrishnan@arm.com>,
Richard Earnshaw <Richard.Earnshaw@arm.com>
Cc: "binutils@sourceware.org" <binutils@sourceware.org>, nd <nd@arm.com>
Subject: Re: [PATCH, BFD, AArch64, x86] Improve warning for --force-bti.
Date: Fri, 12 Apr 2019 14:42:00 -0000 [thread overview]
Message-ID: <aa658f25-0444-bd72-837b-7680e3b05f36@arm.com> (raw)
In-Reply-To: <98dd92e4-4273-5b4a-4542-fa82d837b237@arm.com>
Hi
On 03/04/2019 15:36, Sudakshina Das wrote:
> Hi HJ
>
> On 02/04/2019 13:31, H.J. Lu wrote:
>> On Tue, Apr 2, 2019 at 2:05 AM Sudakshina Das <Sudi.Das@arm.com> wrote:
>>>
>>> Hi HJ
>>>
>>> On 01/04/2019 20:26, H.J. Lu wrote:
>>>> On Thu, Mar 21, 2019 at 9:25 AM Sudakshina Das <Sudi.Das@arm.com>
>>>> wrote:
>>>>>
>>>>> Hi Nick
>>>>>
>>>>> On 21/03/2019 15:14, Nick Clifton wrote:
>>>>>> Hi Sudi,
>>>>>>
>>>>>>> *** bfd/ChangeLog ***
>>>>>>>
>>>>>>> 2019-xx-xx Sudakshina Das <sudi.das@arm.com>
>>>>>>>
>>>>>>> * elf-bfd.h (struct elf_backend_data): Add argument to
>>>>>>> merge_gnu_properties.
>>>>>>> * elf-properties.c (elf_merge_gnu_properties): Add
>>>>>>> argument to
>>>>>>> itself and while calling bed->merge_gnu_properties.
>>>>>>> (elf_merge_gnu_property_list): Update the calls for
>>>>>>> elf_merge_gnu_properties.
>>>>>>> * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties):
>>>>>>> Update handling
>>>>>>> of --force-bti warning and add argument.
>>>>>>> * elfxx-aarch64.c
>>>>>>> (_bfd_aarch64_elf_link_setup_gnu_properties): Add
>>>>>>> warning.
>>>>>>> * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add
>>>>>>> argument.
>>>>>>> * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties):
>>>>>>> Likewise in
>>>>>>> declaration.
>>>>>>>
>>>>>>> *** ld/ChangeLog ***
>>>>>>>
>>>>>>> 2019-xx-xx Sudakshina Das <sudi.das@arm.com>
>>>>>>>
>>>>>>> * testsuite/ld-aarch64/aarch64-elf.exp: Add new test.
>>>>>>> * testsuite/ld-aarch64/bti-plt-1.s: Add .ifdef for PAC
>>>>>>> note section.
>>>>>>> * testsuite/ld-aarch64/bti-plt-6.d: Update warning.
>>>>>>> * testsuite/ld-aarch64/bti-plt-7.d: Likewise.
>>>>>>> * testsuite/ld-aarch64/bti-warn.d: New test.
>>>>>>
>>>>>> Approved - please apply.
>>>>>
>>>>> Thanks for the approval. Committed as
>>>>> 4e5391148d51c58785aad637f1a92d47b91b3ae6
>>>>>
>>>>> Sudi
>>>>>
>>>>
>>>> Isn't --force-bti for ELF only? Shouldn't it use "-z force-bti"?
>>>
>>> Sorry I was not aware of any elf specific meaning given to -z. Is this a
>>> convention? I can not seem to find any particular documentation for it.
>>>
>>
>> This is the convention. See how PARSE_AND_LIST_ARGS_CASE_Z
>> is used. You can also define PARSE_AND_LIST_OPTIONS to update
>> "ld --help".
>
> The current options that are defined for bti and pac are defined in
> ld/emultempl/aarch64elf.em which "is sourced from elf32.em, and defines
> extra aarch64-elf specific routines". They do appear
> PARSE_AND_LIST_OPTIONS and hence appear in ld --help.
>
> Example
>
> aarch64elf:
> --no-enum-size-warning Don't warn about objects with incompatible
> enum sizes
> --no-wchar-size-warning Don't warn about objects with incompatible
> wchar_t sizes
> --pic-veneer Always generate PIC interworking veneers
> --stub-group-size=N Maximum size of a group of input sections
> that
> can be handled by one stub section. A
> negative
> value locates all stubs after their
> branches
> (with a group size of -N), while a
> positive
> value allows two groups of input
> sections, one
> before, and one after each stub section.
> Values of +/-1 indicate the linker should
> choose suitable defaults.
> --fix-cortex-a53-835769 Fix erratum 835769
> --fix-cortex-a53-843419 Fix erratum 843419
> --no-apply-dynamic-relocs Do not apply link-time values for
> dynamic relocations
> --force-bti Turn on Branch Target Identification
> mechanism and generate PLTs with BTI. Generate warnings for missing BTI
> on inputs
> --pac-plt Protect PLTs with Pointer Authentication.
>
> From what I can see in the Arm or AArch64 backend, none of the the
> target specific options are defined using the -z option. Though I have
> to admit I don not know if those options are all generic to the target
> rather than being ELF only.
>
> I would like to gather opinions of other port maintainers before I move
> these to -z.
>
As discussed I will post a patch to move the command line option behind
-z soon :)
Thanks
Sudi
> Thanks
> Sudi
>>
>
prev parent reply other threads:[~2019-04-12 14:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-20 13:30 Sudakshina Das
2019-03-21 15:14 ` Nick Clifton
2019-03-21 16:24 ` Sudakshina Das
2019-03-21 22:57 ` H.J. Lu
2019-04-01 19:27 ` H.J. Lu
2019-04-02 9:05 ` Sudakshina Das
2019-04-02 12:32 ` H.J. Lu
2019-04-03 14:36 ` Sudakshina Das
2019-04-12 14:42 ` Sudakshina Das [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=aa658f25-0444-bd72-837b-7680e3b05f36@arm.com \
--to=sudi.das@arm.com \
--cc=Ramana.Radhakrishnan@arm.com \
--cc=Richard.Earnshaw@arm.com \
--cc=binutils@sourceware.org \
--cc=hjl.tools@gmail.com \
--cc=nd@arm.com \
--cc=nickc@redhat.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).