diff options
Diffstat (limited to 'sysdeps/riscv')
-rw-r--r-- | sysdeps/riscv/dl-relocate-ld.h | 32 | ||||
-rw-r--r-- | sysdeps/riscv/ldsodefs.h | 5 |
2 files changed, 32 insertions, 5 deletions
diff --git a/sysdeps/riscv/dl-relocate-ld.h b/sysdeps/riscv/dl-relocate-ld.h new file mode 100644 index 0000000000..10327454b1 --- /dev/null +++ b/sysdeps/riscv/dl-relocate-ld.h @@ -0,0 +1,32 @@ +/* Check if dynamic section should be relocated. RISC-V version. + Copyright (C) 2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _DL_RELOCATE_LD_H +#define _DL_RELOCATE_LD_H + +/* Return true if dynamic section in the shared library L should be + relocated. */ + +static inline bool +dl_relocate_ld (const struct link_map *l) +{ + /* Never relocate dynamic section for ABI compatibility. */ + return false; +} + +#endif /* _DL_RELOCATE_LD_H */ diff --git a/sysdeps/riscv/ldsodefs.h b/sysdeps/riscv/ldsodefs.h index 0c696714a7..8947ffe4b5 100644 --- a/sysdeps/riscv/ldsodefs.h +++ b/sysdeps/riscv/ldsodefs.h @@ -38,11 +38,6 @@ struct La_riscv_retval; struct La_riscv_retval *, \ const char *); -/* Although the RISC-V ABI does not specify that the dynamic section has - to be read-only, it needs to be kept for ABI compatibility. */ - -#define DL_RO_DYN_SECTION 1 - #include_next <ldsodefs.h> #endif |