1*c5c422faSmartin /* $NetBSD: crtbegin.h,v 1.4 2013/07/27 13:07:06 martin Exp $ */ 22b0b9e5dSmatt /*- 32b0b9e5dSmatt * Copyright (c) 2013 The NetBSD Foundation, Inc. 42b0b9e5dSmatt * All rights reserved. 52b0b9e5dSmatt * 62b0b9e5dSmatt * This code is derived from software contributed to The NetBSD Foundation 72b0b9e5dSmatt * by Matt Thomas of 3am Software Foundry. 82b0b9e5dSmatt * 92b0b9e5dSmatt * Redistribution and use in source and binary forms, with or without 102b0b9e5dSmatt * modification, are permitted provided that the following conditions 112b0b9e5dSmatt * are met: 122b0b9e5dSmatt * 1. Redistributions of source code must retain the above copyright 132b0b9e5dSmatt * notice, this list of conditions and the following disclaimer. 142b0b9e5dSmatt * 2. Redistributions in binary form must reproduce the above copyright 152b0b9e5dSmatt * notice, this list of conditions and the following disclaimer in the 162b0b9e5dSmatt * documentation and/or other materials provided with the distribution. 172b0b9e5dSmatt * 182b0b9e5dSmatt * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 192b0b9e5dSmatt * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 202b0b9e5dSmatt * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 212b0b9e5dSmatt * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 222b0b9e5dSmatt * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 232b0b9e5dSmatt * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 242b0b9e5dSmatt * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 252b0b9e5dSmatt * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 262b0b9e5dSmatt * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 272b0b9e5dSmatt * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 282b0b9e5dSmatt * POSSIBILITY OF SUCH DAMAGE. 292b0b9e5dSmatt */ 302b0b9e5dSmatt 312b0b9e5dSmatt __asm( ".pushsection .init" 322c3a3e1cSmatt #ifdef __pic__ 332c3a3e1cSmatt "\n\t" "bsrl __do_global_ctors_aux" 342c3a3e1cSmatt #else 35bfbfd7bbSmatt "\n\t" "jsr __do_global_ctors_aux" 362c3a3e1cSmatt #endif 372b0b9e5dSmatt "\n\t" ".popsection"); 382b0b9e5dSmatt 392b0b9e5dSmatt __asm( ".pushsection .fini" 402c3a3e1cSmatt #ifdef __pic__ 41*c5c422faSmartin "\n\t" "bsrl __do_global_dtors_aux" 422c3a3e1cSmatt #else 43bfbfd7bbSmatt "\n\t" "jsr __do_global_dtors_aux" 442c3a3e1cSmatt #endif 452b0b9e5dSmatt "\n\t" ".popsection"); 46