This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: aarch64: remove literal pools in start.S
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: wangboshi <wangboshi at huawei dot com>, libc-help at sourceware dot org
- Cc: nd at arm dot com
- Date: Mon, 04 Sep 2017 17:24:46 +0100
- Subject: Re: aarch64: remove literal pools in start.S
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- Nodisclaimer: True
- References: <b7ef0945-4d79-0b11-938b-ba92fd03d525@huawei.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 04/09/17 14:18, wangboshi wrote:
> I want to set code as executable and non-readable (known as XOM) against some attacks. But literal pools in
> code section make it impossible. Some compiler options, like execute_only (armcc) , mpure-code(gcc & clang)
> and mexecute-only(clang), can disable literal pools. But they can't disable literal pools in
> sysdeps/aarch64/start.S, so I want to remove literal pools.
>
> Would it make some compatible problems?
>
it should not be a problem i think
(just put the literals in rodata and use adrp)
send a patch to libc-alpha or open a ticket about it.
it won't work with -mcmodel=large static linked
executables (when .text can be larger than 4G)