linux-openrisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] or1k: add .note.GNU-stack section on linux
@ 2025-01-06 13:01 Stafford Horne
  2025-01-06 14:37 ` Jeff Law
  0 siblings, 1 reply; 5+ messages in thread
From: Stafford Horne @ 2025-01-06 13:01 UTC (permalink / raw)
  To: GCC patches; +Cc: Linux OpenRISC, Stafford Horne

In the OpenRISC build we get the following warning:

    ld: warning: __modsi3_s.o: missing .note.GNU-stack section implies executable stack
    ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker

Fix this by adding a .note.GNU-stack to indicate the stack does not need to be
executable for the lib1funcs.

Note, this is also needed for the upcoming glibc 2.41.

libgcc/
	* config/or1k/lib1funcs.S: Add .note.GNU-stack section on linux.
---
 libgcc/config/or1k/lib1funcs.S | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libgcc/config/or1k/lib1funcs.S b/libgcc/config/or1k/lib1funcs.S
index 0c2ec5fc8c4..8f7266bedb9 100644
--- a/libgcc/config/or1k/lib1funcs.S
+++ b/libgcc/config/or1k/lib1funcs.S
@@ -19,6 +19,11 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
+/* An executable stack is *not* required for these functions.  */
+#ifdef __linux__
+.section .note.GNU-stack,"",%progbits
+.previous
+#endif
 
 #ifdef L__mulsi3
 	.balign 4
-- 
2.47.0


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

* Re: [PATCH] or1k: add .note.GNU-stack section on linux
  2025-01-06 13:01 [PATCH] or1k: add .note.GNU-stack section on linux Stafford Horne
@ 2025-01-06 14:37 ` Jeff Law
  2025-01-06 17:02   ` Stafford Horne
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Law @ 2025-01-06 14:37 UTC (permalink / raw)
  To: Stafford Horne, GCC patches; +Cc: Linux OpenRISC



On 1/6/25 6:01 AM, Stafford Horne wrote:
> In the OpenRISC build we get the following warning:
> 
>      ld: warning: __modsi3_s.o: missing .note.GNU-stack section implies executable stack
>      ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
> 
> Fix this by adding a .note.GNU-stack to indicate the stack does not need to be
> executable for the lib1funcs.
> 
> Note, this is also needed for the upcoming glibc 2.41.
> 
> libgcc/
> 	* config/or1k/lib1funcs.S: Add .note.GNU-stack section on linux.
OK for the trunk.  You've got write privs, correct?

jeff


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

* Re: [PATCH] or1k: add .note.GNU-stack section on linux
  2025-01-06 14:37 ` Jeff Law
@ 2025-01-06 17:02   ` Stafford Horne
  2025-01-06 17:03     ` Jeff Law
  0 siblings, 1 reply; 5+ messages in thread
From: Stafford Horne @ 2025-01-06 17:02 UTC (permalink / raw)
  To: Jeff Law; +Cc: GCC patches, Linux OpenRISC

On Mon, Jan 06, 2025 at 07:37:56AM -0700, Jeff Law wrote:
> 
> 
> On 1/6/25 6:01 AM, Stafford Horne wrote:
> > In the OpenRISC build we get the following warning:
> > 
> >      ld: warning: __modsi3_s.o: missing .note.GNU-stack section implies executable stack
> >      ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
> > 
> > Fix this by adding a .note.GNU-stack to indicate the stack does not need to be
> > executable for the lib1funcs.
> > 
> > Note, this is also needed for the upcoming glibc 2.41.
> > 
> > libgcc/
> > 	* config/or1k/lib1funcs.S: Add .note.GNU-stack section on linux.
> OK for the trunk.  You've got write privs, correct?

Thanks,

Yes I should still have access.  Also, I would like to add to the release-14
branch.  Is there anything special I need to do to add the patch there?

-Stafford

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

* Re: [PATCH] or1k: add .note.GNU-stack section on linux
  2025-01-06 17:02   ` Stafford Horne
@ 2025-01-06 17:03     ` Jeff Law
  2025-01-06 17:26       ` Stafford Horne
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Law @ 2025-01-06 17:03 UTC (permalink / raw)
  To: Stafford Horne; +Cc: GCC patches, Linux OpenRISC



On 1/6/25 10:02 AM, Stafford Horne wrote:
> On Mon, Jan 06, 2025 at 07:37:56AM -0700, Jeff Law wrote:
>>
>>
>> On 1/6/25 6:01 AM, Stafford Horne wrote:
>>> In the OpenRISC build we get the following warning:
>>>
>>>       ld: warning: __modsi3_s.o: missing .note.GNU-stack section implies executable stack
>>>       ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
>>>
>>> Fix this by adding a .note.GNU-stack to indicate the stack does not need to be
>>> executable for the lib1funcs.
>>>
>>> Note, this is also needed for the upcoming glibc 2.41.
>>>
>>> libgcc/
>>> 	* config/or1k/lib1funcs.S: Add .note.GNU-stack section on linux.
>> OK for the trunk.  You've got write privs, correct?
> 
> Thanks,
> 
> Yes I should still have access.  Also, I would like to add to the release-14
> branch.  Is there anything special I need to do to add the patch there?
Nothing really special on the release branches.

jeff

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

* Re: [PATCH] or1k: add .note.GNU-stack section on linux
  2025-01-06 17:03     ` Jeff Law
@ 2025-01-06 17:26       ` Stafford Horne
  0 siblings, 0 replies; 5+ messages in thread
From: Stafford Horne @ 2025-01-06 17:26 UTC (permalink / raw)
  To: Jeff Law; +Cc: GCC patches, Linux OpenRISC

On Mon, Jan 06, 2025 at 10:03:50AM -0700, Jeff Law wrote:
> 
> 
> On 1/6/25 10:02 AM, Stafford Horne wrote:
> > On Mon, Jan 06, 2025 at 07:37:56AM -0700, Jeff Law wrote:
> > > 
> > > 
> > > On 1/6/25 6:01 AM, Stafford Horne wrote:
> > > > In the OpenRISC build we get the following warning:
> > > > 
> > > >       ld: warning: __modsi3_s.o: missing .note.GNU-stack section implies executable stack
> > > >       ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
> > > > 
> > > > Fix this by adding a .note.GNU-stack to indicate the stack does not need to be
> > > > executable for the lib1funcs.
> > > > 
> > > > Note, this is also needed for the upcoming glibc 2.41.
> > > > 
> > > > libgcc/
> > > > 	* config/or1k/lib1funcs.S: Add .note.GNU-stack section on linux.
> > > OK for the trunk.  You've got write privs, correct?
> > 
> > Thanks,
> > 
> > Yes I should still have access.  Also, I would like to add to the release-14
> > branch.  Is there anything special I need to do to add the patch there?
> Nothing really special on the release branches.

Thanks, I have pushed the patch to trunk and releases/gcc-14.

-Stafford

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

end of thread, other threads:[~2025-01-06 17:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-06 13:01 [PATCH] or1k: add .note.GNU-stack section on linux Stafford Horne
2025-01-06 14:37 ` Jeff Law
2025-01-06 17:02   ` Stafford Horne
2025-01-06 17:03     ` Jeff Law
2025-01-06 17:26       ` Stafford Horne

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 NNTP newsgroup(s).