Re: Troubles building world on stable/13 [How to set just the compiler to avoid ASLR being enabled for it]

Mark Millard <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>
The following shows how to examine and control the compiler's ASLR
status (notation shown presumes first cd'ing to where the c++ file
is):

# elfctl c++
File 'c++' features:
noaslr          'Disable ASLR' is unset.
noprotmax       'Disable implicit PROT_MAX' is unset.
nostackgap      'Disable stack gap' is unset.
wxneeded        'Requires W+X mappings' is unset.
la48            'amd64: Limit user VA to 48bit' is unset.
noaslrstkgap    'Disable ASLR stack gap' is unset.

# elfctl -e +noaslr c++

# elfctl c++
File 'c++' features:
noaslr          'Disable ASLR' is set.
noprotmax       'Disable implicit PROT_MAX' is unset.
nostackgap      'Disable stack gap' is unset.
wxneeded        'Requires W+X mappings' is unset.
la48            'amd64: Limit user VA to 48bit' is unset.
noaslrstkgap    'Disable ASLR stack gap' is unset.

(noaslrstkgap may be fairly specific to the vintage of
main [so: 14] that I'm at and so might not show up.)

Being tied to the file, this survives reboots.

This should avoid needing the system wide disable
that I'd previously listed. In other words: no need
for:

# sysctl kern.elf64.aslr.enable=0

(which would not survive a reboot).

===
Mark Millard
marklmi at yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.