10a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu/* 20a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu * Copyright 2011, The Android Open Source Project 30a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu * 40a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu * Licensed under the Apache License, Version 2.0 (the "License"); 50a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu * you may not use this file except in compliance with the License. 60a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu * You may obtain a copy of the License at 70a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu * 80a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu * http://www.apache.org/licenses/LICENSE-2.0 90a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu * 100a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu * Unless required by applicable law or agreed to in writing, software 110a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu * distributed under the License is distributed on an "AS IS" BASIS, 120a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 130a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu * See the License for the specific language governing permissions and 140a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu * limitations under the License. 150a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu */ 160a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu 170a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu#ifndef GOT_H 180a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu#define GOT_H 190a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu 200a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu#include "utils/rsl_assert.h" 210a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu#include "ELF.h" 220a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu 230a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu#define GP_OFFSET ((int)0x8000) 240a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu#define GOT_SIZE (1 << 16) // bytes 250a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu#define GOT_ENTRY_SIZE 4 // bytes 260a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu#define NUM_OF_GOT_ENTRY (GOT_SIZE/GOT_ENTRY_SIZE) 270a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu 280a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fuvoid *got_address(); 290a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fuint search_got(int symbol_index, void *addr, uint8_t bind_type); 300a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu 310a2be45c942a83bb70a7cf1b7355db73cd30f9b9Chao-ying Fu#endif // GOT_H 32