Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: add linker flags for binaries #132

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

kbipinkumar
Copy link
Contributor

Thanks for merging the PR #131

in additon to ptaching $(DESTDIR) variable we were also patching $(LDFLAGS) linker flags into makefile. the binaries generated by unpatched makefile lacked RELRO mitigations.

amrfinderplus W: ELF file ('usr/bin/amr_report') lacks FULL RELRO, check LDFLAGS.
amrfinderplus W: ELF file ('usr/bin/amrfinder') lacks FULL RELRO, check LDFLAGS.
amrfinderplus W: ELF file ('usr/bin/amrfinder_index') lacks FULL RELRO, check LDFLAGS.
amrfinderplus W: ELF file ('usr/bin/amrfinder_update') lacks FULL RELRO, check LDFLAGS.
amrfinderplus W: ELF file ('usr/bin/dna_mutation') lacks FULL RELRO, check LDFLAGS.
amrfinderplus W: ELF file ('usr/bin/fasta2parts') lacks FULL RELRO, check LDFLAGS.
amrfinderplus W: ELF file ('usr/bin/fasta_check') lacks FULL RELRO, check LDFLAGS.
amrfinderplus W: ELF file ('usr/bin/fasta_extract') lacks FULL RELRO, check LDFLAGS.
amrfinderplus W: ELF file ('usr/bin/gff_check') lacks FULL RELRO, check LDFLAGS.

Major distros including archlinux strongly encourages RELRO mitigations be applied to binaries.

Adding $(LDFLAGS) to the Makefile will allow binaries to be built using the appropriate linker flags set in the build server environment.

@evolarjun
Copy link
Contributor

I have some deadlines in the next two weeks, so it may take some time, but I'll definitely take a look before the next release. Thanks!

@evolarjun evolarjun merged commit a826b72 into ncbi:master Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants