dm9pZCAq

  • 1 Post
  • 19 Comments
Joined 4 years ago
cake
Cake day: February 20th, 2021

help-circle









  • dm9pZCAqtoGentoogcc cflags related to security
    link
    fedilink
    arrow-up
    2
    ·
    3 years ago

    LDFLAGS

    ld -z now, gcc -Wl,-z,now

    When generating an executable or shared library, mark it to tell the dynamic linker to resolve all symbols when the program is started, or when the shared library is loaded by dlopen, instead of deferring function call resolution to the point when the function is first called.

    ld -z relro, gcc -Wl,-z,relro

    Create an ELF “PT_GNU_RELRO” segment header in the object. This specifies a memory segment that should be made read-only after relocation, if supported. Specifying common-page-size smaller tha the system page size will render this protection ineffective.


    also some additional useful info can be found here https://wiki.debian.org/Hardening