From: Xi Ruoyao <xry111@xry111.site>
To: Andreas Schwab <schwab@suse.de>, liuzhensong <liuzhensong@loongson.cn>
Cc: xuchenghua@loongson.cn, chenglulu@loongson.cn,
binutils@sourceware.org, maskray@google.com,
caiyinyu@loongson.cn, Huacai Chen <chenhuacai@kernel.org>
Subject: Re: [PATCH] LoongArch: Set defaults to exec stack 0.
Date: Mon, 25 Jul 2022 16:14:26 +0800 [thread overview]
Message-ID: <4a264fe57282c1a191204775ffe033512240d2eb.camel@xry111.site> (raw)
In-Reply-To: <mvmilnlmx6p.fsf@suse.de>
On Mon, 2022-07-25 at 10:08 +0200, Andreas Schwab via Binutils wrote:
> On Jul 25 2022, liuzhensong wrote:
>
> > diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c
> > index 4efe3d9370c..43182ead8cd 100644
> > --- a/bfd/elfnn-loongarch.c
> > +++ b/bfd/elfnn-loongarch.c
> > @@ -132,6 +132,7 @@ struct loongarch_elf_link_hash_table
> >
> > #define elf_backend_want_dynrelro 1
> > #define elf_backend_rela_normal 1
> > +#define elf_backend_default_execstack 0
>
> AFAICS, the loongarch kernel defaults to executable stack:
>
> arch/loongarch/include/asm/elf.h:#define elf_read_implies_exec(ex,
> exec_stk) (exec_stk == EXSTACK_DEFAULT)
+ Huacai.
> Which means this change is wrong.
The doc of elf_backend_default_execstack says:
/* True if an object file lacking a .note.GNU-stack section
should be assumed to be requesting exec stack. At least one
other file in the link needs to have a .note.GNU-stack section
for a PT_GNU_STACK segment to be created. */
So I think it only controls the default behavior of bfd library and is
not related to the kernel?
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
next prev parent reply other threads:[~2022-07-25 8:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 2:22 liuzhensong
2022-07-25 2:24 ` WANG Xuerui
2022-07-25 2:44 ` Xi Ruoyao
2022-07-25 7:51 ` Fangrui Song
2022-07-25 8:08 ` Andreas Schwab
2022-07-25 8:14 ` Xi Ruoyao [this message]
2022-07-25 8:35 ` Andreas Schwab
2022-07-25 9:17 ` WANG Xuerui
2022-07-25 9:18 ` Huacai Chen
2022-07-25 9:22 ` Xi Ruoyao
2022-07-25 9:44 ` WANG Xuerui
2022-07-30 19:20 ` WANG Xuerui
2022-08-01 1:10 ` liuzhensong
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=4a264fe57282c1a191204775ffe033512240d2eb.camel@xry111.site \
--to=xry111@xry111.site \
--cc=binutils@sourceware.org \
--cc=caiyinyu@loongson.cn \
--cc=chenglulu@loongson.cn \
--cc=chenhuacai@kernel.org \
--cc=liuzhensong@loongson.cn \
--cc=maskray@google.com \
--cc=schwab@suse.de \
--cc=xuchenghua@loongson.cn \
/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).