1be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner/* 2be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * Copyright (C) 2010 The Android Open Source Project 3be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * All rights reserved. 4be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * 5be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * Redistribution and use in source and binary forms, with or without 6be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * modification, are permitted provided that the following conditions 7be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * are met: 8be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * * Redistributions of source code must retain the above copyright 9be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * notice, this list of conditions and the following disclaimer. 10be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * * Redistributions in binary form must reproduce the above copyright 11be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * notice, this list of conditions and the following disclaimer in 12be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * the documentation and/or other materials provided with the 13be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * distribution. 14be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * 15be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 18be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 19be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 20be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 21be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 22be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 25be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner * SUCH DAMAGE. 27be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner */ 2818a206c81d9743481e364384affd43306911283dElliott Hughes 29be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner#ifndef LINKER_ENVIRON_H 30be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner#define LINKER_ENVIRON_H 31be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner 3242b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughesstruct KernelArgumentBlock; 3342b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes 3442b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes// Call this function before any of the other functions in this header file. 3542b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughesextern void linker_env_init(KernelArgumentBlock& args); 36be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner 3718a206c81d9743481e364384affd43306911283dElliott Hughes// Returns the value of environment variable 'name' if defined and not 380894b2c5d35c9c3a7483ed8faaf65fd6d9ffb00bElliott Hughes// empty, or NULL otherwise. 39be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turnerextern const char* linker_env_get(const char* name); 40be5755969d70668bbab0e0c0ed75ebd867189723David 'Digit' Turner 4118a206c81d9743481e364384affd43306911283dElliott Hughes// Returns the value of this program's AT_SECURE variable. 4218a206c81d9743481e364384affd43306911283dElliott Hughesextern bool get_AT_SECURE(); 434688279db5dcc4004941e7f133c4a1c3617d842cElliott Hughes 4442b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes#endif // LINKER_ENVIRON_H 45