This is an archive of the discontinued LLVM Phabricator instance.

[Support] Enable BLAKE3 .note.GNU-stack sections on FreeBSD
Needs RevisionPublic

Authored by dim on Jul 12 2022, 1:12 PM.

Details

Summary

Several .S files for accelerating BLAKE3 have directives to add
.note.GNU-stack sections on Linux, to signal a non-executable stack.
Enable these for FreeBSD too.

Diff Detail

Event Timeline

dim created this revision.Jul 12 2022, 1:12 PM
dim requested review of this revision.Jul 12 2022, 1:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 12 2022, 1:12 PM
MaskRay added a comment.EditedJul 12 2022, 1:29 PM

lld ignores input sections .note.GNU-stack and just default to non-executable PT_GNU_STACK. I think this is the direction for GNU ld, too.
Therefore I think this is unneeded. If you still want to do it, updating the upstream first is the right direction.

MaskRay requested changes to this revision.Jul 25 2022, 2:13 PM

Request changes with aforementioned reasons.

If FreeBSD still uses binutils somehow, you may change it to ignore .note.GNU-stack. This section is mostly not really used at this point.

binutils is moving toward this goal too https://sourceware.org/bugzilla/show_bug.cgi?id=29072#c9

This revision now requires changes to proceed.Jul 25 2022, 2:13 PM