mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Change naming of ELF interfaces from arch_ to up_ for consistency
This commit is contained in:
@@ -87,7 +87,7 @@ CMN_CSRCS += arm_addrenv.c
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_ELF),y)
|
ifeq ($(CONFIG_ELF),y)
|
||||||
CMN_CSRCS += arm_elf.c arch_coherent_dcache.c
|
CMN_CSRCS += arm_elf.c arm_coherent_dcache.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_ARCH_FPU),y)
|
ifeq ($(CONFIG_ARCH_FPU),y)
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: arch_checkarch
|
* Name: up_checkarch
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Given the ELF header in 'hdr', verify that the ELF file is appropriate
|
* Given the ELF header in 'hdr', verify that the ELF file is appropriate
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
bool arch_checkarch(FAR const Elf32_Ehdr *ehdr)
|
bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||||
{
|
{
|
||||||
/* Make sure it's an ARM executable */
|
/* Make sure it's an ARM executable */
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ bool arch_checkarch(FAR const Elf32_Ehdr *ehdr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: arch_relocate and arch_relocateadd
|
* Name: up_relocate and up_relocateadd
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Perform on architecture-specific ELF relocation. Every architecture
|
* Perform on architecture-specific ELF relocation. Every architecture
|
||||||
@@ -140,8 +140,8 @@ bool arch_checkarch(FAR const Elf32_Ehdr *ehdr)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int arch_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||||
uintptr_t addr)
|
uintptr_t addr)
|
||||||
{
|
{
|
||||||
int32_t offset;
|
int32_t offset;
|
||||||
|
|
||||||
@@ -248,8 +248,8 @@ int arch_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int arch_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
||||||
uintptr_t addr)
|
uintptr_t addr)
|
||||||
{
|
{
|
||||||
bdbg("RELA relocation not supported\n");
|
bdbg("RELA relocation not supported\n");
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: arch_checkarch
|
* Name: up_checkarch
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Given the ELF header in 'hdr', verify that the ELF file is appropriate
|
* Given the ELF header in 'hdr', verify that the ELF file is appropriate
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
bool arch_checkarch(FAR const Elf32_Ehdr *ehdr)
|
bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||||
{
|
{
|
||||||
/* Make sure it's an ARM executable */
|
/* Make sure it's an ARM executable */
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ bool arch_checkarch(FAR const Elf32_Ehdr *ehdr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: arch_relocate and arch_relocateadd
|
* Name: up_relocate and up_relocateadd
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Perform on architecture-specific ELF relocation. Every architecture
|
* Perform on architecture-specific ELF relocation. Every architecture
|
||||||
@@ -132,8 +132,8 @@ bool arch_checkarch(FAR const Elf32_Ehdr *ehdr)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int arch_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||||
uintptr_t addr)
|
uintptr_t addr)
|
||||||
{
|
{
|
||||||
int32_t offset;
|
int32_t offset;
|
||||||
uint32_t upper_insn;
|
uint32_t upper_insn;
|
||||||
@@ -441,8 +441,8 @@ int arch_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int arch_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
||||||
uintptr_t addr)
|
uintptr_t addr)
|
||||||
{
|
{
|
||||||
bdbg("RELA relocation not supported\n");
|
bdbg("RELA relocation not supported\n");
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/armv7/arch_undefinedinsn.c
|
* arch/arm/src/armv7/up_coherent_dcache.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: arch_coherent_dcache
|
* Name: up_coherent_dcache
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Ensure that the I and D caches are coherent within specified region
|
* Ensure that the I and D caches are coherent within specified region
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void arch_coherent_dcache(uintptr_t addr, size_t len)
|
void up_coherent_dcache(uintptr_t addr, size_t len)
|
||||||
{
|
{
|
||||||
/* Perform the operation on the L1 cache */
|
/* Perform the operation on the L1 cache */
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: arch_checkarch
|
* Name: up_checkarch
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Given the ELF header in 'hdr', verify that the ELF file is appropriate
|
* Given the ELF header in 'hdr', verify that the ELF file is appropriate
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
bool arch_checkarch(FAR const Elf32_Ehdr *ehdr)
|
bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||||
{
|
{
|
||||||
/* Make sure it's an ARM executable */
|
/* Make sure it's an ARM executable */
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ bool arch_checkarch(FAR const Elf32_Ehdr *ehdr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: arch_relocate and arch_relocateadd
|
* Name: up_relocate and up_relocateadd
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Perform on architecture-specific ELF relocation. Every architecture
|
* Perform on architecture-specific ELF relocation. Every architecture
|
||||||
@@ -140,8 +140,8 @@ bool arch_checkarch(FAR const Elf32_Ehdr *ehdr)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int arch_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||||
uintptr_t addr)
|
uintptr_t addr)
|
||||||
{
|
{
|
||||||
int32_t offset;
|
int32_t offset;
|
||||||
|
|
||||||
@@ -248,8 +248,8 @@ int arch_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int arch_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
||||||
uintptr_t addr)
|
uintptr_t addr)
|
||||||
{
|
{
|
||||||
bdbg("RELA relocation not supported\n");
|
bdbg("RELA relocation not supported\n");
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: arch_checkarch
|
* Name: up_checkarch
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Given the ELF header in 'hdr', verify that the ELF file is appropriate
|
* Given the ELF header in 'hdr', verify that the ELF file is appropriate
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
bool arch_checkarch(FAR const Elf32_Ehdr *ehdr)
|
bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||||
{
|
{
|
||||||
/* Make sure it's an ARM executable */
|
/* Make sure it's an ARM executable */
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ bool arch_checkarch(FAR const Elf32_Ehdr *ehdr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: arch_relocate and arch_relocateadd
|
* Name: up_relocate and up_relocateadd
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Perform on architecture-specific ELF relocation. Every architecture
|
* Perform on architecture-specific ELF relocation. Every architecture
|
||||||
@@ -132,8 +132,8 @@ bool arch_checkarch(FAR const Elf32_Ehdr *ehdr)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int arch_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||||
uintptr_t addr)
|
uintptr_t addr)
|
||||||
{
|
{
|
||||||
int32_t offset;
|
int32_t offset;
|
||||||
uint32_t upper_insn;
|
uint32_t upper_insn;
|
||||||
@@ -441,8 +441,8 @@ int arch_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int arch_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
||||||
uintptr_t addr)
|
uintptr_t addr)
|
||||||
{
|
{
|
||||||
bdbg("RELA relocation not supported\n");
|
bdbg("RELA relocation not supported\n");
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ CMN_CSRCS += arm_addrenv.c
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_ELF),y)
|
ifeq ($(CONFIG_ELF),y)
|
||||||
CMN_CSRCS += arm_elf.c arch_coherent_dcache.c
|
CMN_CSRCS += arm_elf.c arm_coherent_dcache.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_ARCH_FPU),y)
|
ifeq ($(CONFIG_ARCH_FPU),y)
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: arch_checkarch
|
* Name: up_checkarch
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Given the ELF header in 'hdr', verify that the ELF file is appropriate
|
* Given the ELF header in 'hdr', verify that the ELF file is appropriate
|
||||||
@@ -85,13 +85,13 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
bool arch_checkarch(FAR const Elf32_Ehdr *hdr)
|
bool up_checkarch(FAR const Elf32_Ehdr *hdr)
|
||||||
{
|
{
|
||||||
return hdr->e_machine == EM_386 || hdr->e_machine == EM_486;
|
return hdr->e_machine == EM_386 || hdr->e_machine == EM_486;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: arch_relocate and arch_relocateadd
|
* Name: up_relocate and up_relocateadd
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Perform on architecture-specific ELF relocation. Every architecture
|
* Perform on architecture-specific ELF relocation. Every architecture
|
||||||
@@ -108,8 +108,8 @@ bool arch_checkarch(FAR const Elf32_Ehdr *hdr)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int arch_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||||
uintptr_t addr)
|
uintptr_t addr)
|
||||||
{
|
{
|
||||||
FAR uint32_t *ptr = (FAR uint32_t *)addr;
|
FAR uint32_t *ptr = (FAR uint32_t *)addr;
|
||||||
|
|
||||||
@@ -130,8 +130,8 @@ int arch_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int arch_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
||||||
uintptr_t addr)
|
uintptr_t addr)
|
||||||
{
|
{
|
||||||
bdbg("Not supported\n");
|
bdbg("Not supported\n");
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: arch_checkarch
|
* Name: up_checkarch
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Given the ELF header in 'hdr', verify that the ELF file is appropriate
|
* Given the ELF header in 'hdr', verify that the ELF file is appropriate
|
||||||
@@ -85,13 +85,13 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
bool arch_checkarch(FAR const Elf32_Ehdr *hdr)
|
bool up_checkarch(FAR const Elf32_Ehdr *hdr)
|
||||||
{
|
{
|
||||||
return hdr->e_machine == EM_386 || hdr->e_machine == EM_486;
|
return hdr->e_machine == EM_386 || hdr->e_machine == EM_486;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: arch_relocate and arch_relocateadd
|
* Name: up_relocate and up_relocateadd
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Perform on architecture-specific ELF relocation. Every architecture
|
* Perform on architecture-specific ELF relocation. Every architecture
|
||||||
@@ -108,8 +108,8 @@ bool arch_checkarch(FAR const Elf32_Ehdr *hdr)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int arch_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||||
uintptr_t addr)
|
uintptr_t addr)
|
||||||
{
|
{
|
||||||
FAR uint32_t *ptr = (FAR uint32_t *)addr;
|
FAR uint32_t *ptr = (FAR uint32_t *)addr;
|
||||||
|
|
||||||
@@ -130,8 +130,8 @@ int arch_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int arch_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
||||||
uintptr_t addr)
|
uintptr_t addr)
|
||||||
{
|
{
|
||||||
bdbg("Not supported\n");
|
bdbg("Not supported\n");
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
|
|||||||
Reference in New Issue
Block a user