OffchainLabs / OffchainLabs/hashtree

Pre-compiled .syso files missing .note.GNU-stack section causing linker warnings

Open
#52 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Assembly
Stars
42
Forks
14
Avg merge
11d 15h
Merged PRs (30d)
2

Description

Description

When using hashtree as a Go dependency, the linker emits warnings about missing .note.GNU-stack sections:

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

The pre-compiled .syso files in the repository are outdated and don't include the .note.GNU-stack section, even though the assembly source files (.S) have been properly updated with this section.

Analysis
  • All assembly source files in src/ correctly include .section .note.GNU-stack,"",@progbits for Linux builds
  • The pre-compiled hashtree_amd64.syso contains object files without this section
  • Go uses the .syso files directly during builds, not the source assembly files
Reproduction
  1. Import hashtree in a Go project
  2. Run go build
  3. Observe linker warnings for each assembly object file
Solution

Rebuild all .syso files from current sources:

make go_bindings
# For platform-specific files:
mv hashtree.syso hashtree_amd64.syso
Impact
  • Current: Linker warnings on every build
  • Future: Build failures when linkers remove support for executable stacks
  • Security: Potential security implications from executable stack
Suggested Fix

Update the build process to regenerate all platform-specific .syso files with current toolchain and commit the updated files.

issue description powered by claude, but verified and tested manually :)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the assembly sources in src/ and the committed platform-specific .syso files, especially hashtree_amd64.syso. Run make go_bindings using the current sources, rename the generated file as described, and regenerate the other platform-specific files. Verify that a Go project importing hashtree builds without the missing .note.GNU-stack linker warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.