1*825d6ebaSTaylor Simpson/* 2*825d6ebaSTaylor Simpson * Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved. 3*825d6ebaSTaylor Simpson * 4*825d6ebaSTaylor Simpson * This program is free software; you can redistribute it and/or modify 5*825d6ebaSTaylor Simpson * it under the terms of the GNU General Public License as published by 6*825d6ebaSTaylor Simpson * the Free Software Foundation; either version 2 of the License, or 7*825d6ebaSTaylor Simpson * (at your option) any later version. 8*825d6ebaSTaylor Simpson * 9*825d6ebaSTaylor Simpson * This program is distributed in the hope that it will be useful, 10*825d6ebaSTaylor Simpson * but WITHOUT ANY WARRANTY; without even the implied warranty of 11*825d6ebaSTaylor Simpson * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12*825d6ebaSTaylor Simpson * GNU General Public License for more details. 13*825d6ebaSTaylor Simpson * 14*825d6ebaSTaylor Simpson * You should have received a copy of the GNU General Public License 15*825d6ebaSTaylor Simpson * along with this program; if not, see <http://www.gnu.org/licenses/>. 16*825d6ebaSTaylor Simpson */ 17*825d6ebaSTaylor Simpson 18*825d6ebaSTaylor Simpson#define SYS_write 64 19*825d6ebaSTaylor Simpson#define SYS_exit_group 94 20*825d6ebaSTaylor Simpson#define SYS_exit 93 21*825d6ebaSTaylor Simpson 22*825d6ebaSTaylor Simpson#define FD_STDOUT 1 23*825d6ebaSTaylor Simpson 24*825d6ebaSTaylor Simpson .type str,@object 25*825d6ebaSTaylor Simpson .section .rodata 26*825d6ebaSTaylor Simpsonstr: 27*825d6ebaSTaylor Simpson .string "Hello!\n" 28*825d6ebaSTaylor Simpson .size str, 8 29*825d6ebaSTaylor Simpson 30*825d6ebaSTaylor Simpson.text 31*825d6ebaSTaylor Simpson.global _start 32*825d6ebaSTaylor Simpson_start: 33*825d6ebaSTaylor Simpson r6 = #SYS_write 34*825d6ebaSTaylor Simpson r0 = #FD_STDOUT 35*825d6ebaSTaylor Simpson r1 = ##str 36*825d6ebaSTaylor Simpson r2 = #7 37*825d6ebaSTaylor Simpson trap0(#1) 38*825d6ebaSTaylor Simpson 39*825d6ebaSTaylor Simpson r0 = #0 40*825d6ebaSTaylor Simpson r6 = #SYS_exit_group 41*825d6ebaSTaylor Simpson trap0(#1) 42*825d6ebaSTaylor Simpson 43*825d6ebaSTaylor Simpson.section ".note.ABI-tag", "a" 44*825d6ebaSTaylor Simpson.align 4 45*825d6ebaSTaylor Simpson.long 1f - 0f /* name length */ 46*825d6ebaSTaylor Simpson.long 3f - 2f /* data length */ 47*825d6ebaSTaylor Simpson.long 1 /* note type */ 48*825d6ebaSTaylor Simpson 49*825d6ebaSTaylor Simpson/* 50*825d6ebaSTaylor Simpson * vendor name seems like this should be MUSL but lldb doesn't agree. 51*825d6ebaSTaylor Simpson */ 52*825d6ebaSTaylor Simpson0: .asciz "GNU" 53*825d6ebaSTaylor Simpson1: .align 4 54*825d6ebaSTaylor Simpson2: .long 0 /* linux */ 55*825d6ebaSTaylor Simpson .long 3,0,0 56*825d6ebaSTaylor Simpson3: .align 4 57