public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* aarch64: remove literal pools in start.S
@ 2017-09-04 13:18 wangboshi
  2017-09-04 16:25 ` Szabolcs Nagy
  0 siblings, 1 reply; 2+ messages in thread
From: wangboshi @ 2017-09-04 13:18 UTC (permalink / raw)
  To: libc-help

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?


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: aarch64: remove literal pools in start.S
  2017-09-04 13:18 aarch64: remove literal pools in start.S wangboshi
@ 2017-09-04 16:25 ` Szabolcs Nagy
  0 siblings, 0 replies; 2+ messages in thread
From: Szabolcs Nagy @ 2017-09-04 16:25 UTC (permalink / raw)
  To: wangboshi, libc-help; +Cc: nd

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)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-04 16:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-04 13:18 aarch64: remove literal pools in start.S wangboshi
2017-09-04 16:25 ` Szabolcs Nagy

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).