1/* 2 * Copyright (C) 2015 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17#ifndef __LINKER_RELOCS_H 18#define __LINKER_RELOCS_H 19 20#include <elf.h> 21 22#define R_GENERIC_NONE 0 // R_*_NONE is always 0 23 24#if defined (__aarch64__) 25 26#define R_GENERIC_JUMP_SLOT R_AARCH64_JUMP_SLOT 27#define R_GENERIC_GLOB_DAT R_AARCH64_GLOB_DAT 28#define R_GENERIC_RELATIVE R_AARCH64_RELATIVE 29#define R_GENERIC_IRELATIVE R_AARCH64_IRELATIVE 30 31#elif defined (__arm__) 32 33#define R_GENERIC_JUMP_SLOT R_ARM_JUMP_SLOT 34#define R_GENERIC_GLOB_DAT R_ARM_GLOB_DAT 35#define R_GENERIC_RELATIVE R_ARM_RELATIVE 36#define R_GENERIC_IRELATIVE R_ARM_IRELATIVE 37 38#elif defined (__i386__) 39 40#define R_GENERIC_JUMP_SLOT R_386_JMP_SLOT 41#define R_GENERIC_GLOB_DAT R_386_GLOB_DAT 42#define R_GENERIC_RELATIVE R_386_RELATIVE 43#define R_GENERIC_IRELATIVE R_386_IRELATIVE 44 45#elif defined (__x86_64__) 46 47#define R_GENERIC_JUMP_SLOT R_X86_64_JUMP_SLOT 48#define R_GENERIC_GLOB_DAT R_X86_64_GLOB_DAT 49#define R_GENERIC_RELATIVE R_X86_64_RELATIVE 50#define R_GENERIC_IRELATIVE R_X86_64_IRELATIVE 51 52#endif 53 54#endif // __LINKER_RELOCS_H 55