Declare the global kernel symbols created by ldscript.arm in arm's machdep.h,
and remove a couple scattered local declarations. Most of these aren't referenced in C code (there are some references in asm code), and they also aren't documented anywhere. This helps a bit with the latter.
This commit is contained in:
parent
19cfcf253e
commit
e214f286f0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=355439
@ -106,8 +106,6 @@ check_ap(void)
|
||||
return (-2);
|
||||
}
|
||||
|
||||
extern unsigned char _end[];
|
||||
|
||||
/* Initialize and fire up non-boot processors */
|
||||
void
|
||||
cpu_mp_start(void)
|
||||
|
@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/systm.h>
|
||||
#include <sys/linker.h>
|
||||
|
||||
#include <machine/machdep.h>
|
||||
#include <machine/stack.h>
|
||||
|
||||
#include "linker_if.h"
|
||||
@ -60,12 +61,6 @@ __FBSDID("$FreeBSD$");
|
||||
/* A special case when we are unable to unwind past this function */
|
||||
#define EXIDX_CANTUNWIND 1
|
||||
|
||||
/*
|
||||
* These are set in the linker script. Their addresses will be
|
||||
* either the start or end of the exception table or index.
|
||||
*/
|
||||
extern int exidx_start, exidx_end;
|
||||
|
||||
/*
|
||||
* Entry types.
|
||||
* These are the only entry types that have been seen in the kernel.
|
||||
@ -154,9 +149,9 @@ find_index(uint32_t addr, int search_modules)
|
||||
int32_t prel31_addr;
|
||||
uint32_t func_addr;
|
||||
|
||||
start = (struct unwind_idx *)&exidx_start;
|
||||
idx_start = (caddr_t)&exidx_start;
|
||||
idx_end = (caddr_t)&exidx_end;
|
||||
start = (struct unwind_idx *)&_exidx_start;
|
||||
idx_start = (caddr_t)&_exidx_start;
|
||||
idx_end = (caddr_t)&_exidx_end;
|
||||
|
||||
/* This may acquire a lock */
|
||||
if (search_modules) {
|
||||
|
@ -61,4 +61,24 @@ void arm_add_efi_map_entries(struct efi_map_header *efihdr,
|
||||
struct mem_region *mr, int *mrcnt);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Symbols created by ldscript.arm which are accessible in the kernel as global
|
||||
* symbols. They have uint8 type because they mark the byte location where the
|
||||
* corresponding data starts or ends (in the end case, it's the next byte
|
||||
* following the data, so the data size is end-start). These are listed below
|
||||
* in the order they occur within the kernel (i.e., the address of each variable
|
||||
* should be greater than any of the ones before it).
|
||||
*/
|
||||
extern uint8_t _start; /* Kernel entry point in locore.S */
|
||||
extern uint8_t _etext; /* text segment end */
|
||||
extern uint8_t _extab_start; /* unwind table start */
|
||||
extern uint8_t _exidx_start; /* unwind index start */
|
||||
extern uint8_t _exidx_end; /* unwind index end */
|
||||
extern uint8_t _start_ctors; /* ctors data start */
|
||||
extern uint8_t _stop_ctors; /* ctors data end */
|
||||
extern uint8_t _edata; /* data segment end */
|
||||
extern uint8_t __bss_start; /* bss segment start */
|
||||
extern uint8_t _ebss; /* bss segment end */
|
||||
extern uint8_t _end; /* End of kernel (text+ctors+unwind+data+bss) */
|
||||
|
||||
#endif /* !_MACHINE_MACHDEP_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user