Skip to content

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

@pk910

Description

@pk910

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions