Do some basic build tuning

This commit is contained in:
Justine Tunney 2023-05-01 14:36:25 -07:00
parent 57cc257f58
commit 8303e23b3a
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
9 changed files with 62 additions and 18 deletions

0
libc/empty.s Normal file
View file

View file

@ -16,6 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef __x86_64__
#include "libc/calls/state.internal.h"
#include "libc/dce.h"
#include "libc/intrin/asan.internal.h"
@ -1497,3 +1498,5 @@ __attribute__((__constructor__)) void __asan_init(int argc, char **argv,
STRACE("/_/ \\_\\____/_/ \\_\\_| \\_|");
STRACE("cosmopolitan memory safety module initialized");
}
#endif /* __x86_64__ */

View file

@ -4,7 +4,11 @@
#if !(__ASSEMBLER__ + __LINKER__ + 0)
#ifndef __STRICT_ANSI__
#define _weaken(symbol) ((const typeof(&(symbol)))_weakaddr(#symbol))
#define _weaken(symbol) \
({ \
asm(".weak\t" #symbol); \
&symbol; \
})
#define _strongaddr(symbolstr) \
({ \