1*06eb0ea5Smartynas /* $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ */ 29c0b8818Smickey 39c0b8818Smickey /* 4d7dd3c5eSmickey * Copyright (c) 1995, 1996 Carnegie-Mellon University. 59c0b8818Smickey * All rights reserved. 69c0b8818Smickey * 79c0b8818Smickey * Author: Chris G. Demetriou 89c0b8818Smickey * 99c0b8818Smickey * Permission to use, copy, modify and distribute this software and 109c0b8818Smickey * its documentation is hereby granted, provided that both the copyright 119c0b8818Smickey * notice and this permission notice appear in all copies of the 129c0b8818Smickey * software, derivative works or modified versions, and any portions 139c0b8818Smickey * thereof, and that both notices appear in supporting documentation. 149c0b8818Smickey * 159c0b8818Smickey * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 169c0b8818Smickey * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 179c0b8818Smickey * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 189c0b8818Smickey * 199c0b8818Smickey * Carnegie Mellon requests users of this software to return to 209c0b8818Smickey * 219c0b8818Smickey * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 229c0b8818Smickey * School of Computer Science 239c0b8818Smickey * Carnegie Mellon University 249c0b8818Smickey * Pittsburgh PA 15213-3890 259c0b8818Smickey * 269c0b8818Smickey * any improvements or extensions that they make and grant Carnegie the 279c0b8818Smickey * rights to redistribute these changes. 289c0b8818Smickey */ 299c0b8818Smickey 309c0b8818Smickey #ifndef _MACHINE_CDEFS_H_ 319c0b8818Smickey #define _MACHINE_CDEFS_H_ 329c0b8818Smickey 33*06eb0ea5Smartynas #define __strong_alias(alias,sym) \ 34*06eb0ea5Smartynas __asm__(".export " __STRING(alias) ", entry\n\t.global " \ 35*06eb0ea5Smartynas __STRING(alias) "\n\t" __STRING(alias) " = " __STRING(sym)) 36d7dd3c5eSmickey #define __weak_alias(alias,sym) \ 37ea085145Sderaadt __asm__(".export " __STRING(alias) ", entry\n\t.weak " \ 38ea085145Sderaadt __STRING(alias) "\n\t" __STRING(alias) " = " __STRING(sym)) 39d7dd3c5eSmickey #define __warn_references(sym,msg) \ 40ea085145Sderaadt __asm__(".section .gnu.warning." __STRING(sym) \ 41ea085145Sderaadt "\n\t.ascii \"" msg "\"\n\t.text") 42d7dd3c5eSmickey 439c0b8818Smickey #endif /* !_MACHINE_CDEFS_H_ */ 44