mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
Turn off default generation of userland dot symbols on powerpc64 now that
we have a binutils that supports it. Kernel dot symbols remain on to assist DDB.
This commit is contained in:
parent
ce8fb93178
commit
79c77d726e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=218824
|
@ -37,6 +37,13 @@
|
|||
#undef TARGET_AIX
|
||||
#define TARGET_AIX TARGET_64BIT
|
||||
|
||||
#ifdef HAVE_LD_NO_DOT_SYMS
|
||||
/* New ABI uses a local sym for the function entry point. */
|
||||
extern int dot_symbols;
|
||||
#undef DOT_SYMBOLS
|
||||
#define DOT_SYMBOLS dot_symbols
|
||||
#endif
|
||||
|
||||
#undef FBSD_TARGET_CPU_CPP_BUILTINS
|
||||
#define FBSD_TARGET_CPU_CPP_BUILTINS() \
|
||||
do \
|
||||
|
@ -196,7 +203,7 @@
|
|||
#ifdef __powerpc64__
|
||||
#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
|
||||
asm (SECTION_OP "\n" \
|
||||
" bl ." #FUNC "\n" \
|
||||
" bl " #FUNC "\n" \
|
||||
" nop\n" \
|
||||
" .previous");
|
||||
#endif
|
||||
|
|
|
@ -32,13 +32,12 @@ __FBSDID("$FreeBSD$");
|
|||
.section ".opd","aw"
|
||||
.align 3
|
||||
_init:
|
||||
.quad ._init,.TOC.@tocbase,0
|
||||
.quad .L._init,.TOC.@tocbase,0
|
||||
.previous
|
||||
.type _init,@function
|
||||
|
||||
.align 4
|
||||
.global ._init
|
||||
.type ._init,@function
|
||||
._init:
|
||||
.L._init:
|
||||
stdu 1,-48(1)
|
||||
mflr 0
|
||||
std 0,64(1)
|
||||
|
@ -49,13 +48,12 @@ _init:
|
|||
.section ".opd","aw"
|
||||
.align 3
|
||||
_fini:
|
||||
.quad ._fini,.TOC.@tocbase,0
|
||||
.quad .L._fini,.TOC.@tocbase,0
|
||||
.previous
|
||||
.type _fini,@function
|
||||
|
||||
.align 4
|
||||
.global ._fini
|
||||
.type ._fini,@function
|
||||
._fini:
|
||||
.L._fini:
|
||||
stdu 1,-48(1)
|
||||
mflr 0
|
||||
std 0,64(1)
|
||||
|
|
|
@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$");
|
|||
void _thread_init_stub(void);
|
||||
|
||||
__weak_reference(_thread_init_stub, _thread_init);
|
||||
__weak_reference_data(_thread_autoinit_dummy_decl_stub,
|
||||
__weak_reference(_thread_autoinit_dummy_decl_stub,
|
||||
_thread_autoinit_dummy_decl);
|
||||
|
||||
int _thread_autoinit_dummy_decl_stub = 0;
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
2: mflr %r0; \
|
||||
std %r0,16(%r1); \
|
||||
stdu %r1,-48(%r1); \
|
||||
bl PIC_PLT(CNAME(HIDENAME(cerror))); \
|
||||
bl CNAME(HIDENAME(cerror)); \
|
||||
nop; \
|
||||
addi %r1,%r1,48; \
|
||||
ld %r0,16(%r1); \
|
||||
|
@ -56,10 +56,6 @@ ENTRY(__CONCAT(__sys_,x)); \
|
|||
.set CNAME(x),CNAME(__CONCAT(__sys_,x)); \
|
||||
.weak CNAME(__CONCAT(_,x)); \
|
||||
.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
|
||||
.weak CNAME(__CONCAT(.,x)); \
|
||||
.set CNAME(__CONCAT(.,x)),CNAME(__CONCAT(.__sys_,x));\
|
||||
.weak CNAME(__CONCAT(._,x)); \
|
||||
.set CNAME(__CONCAT(._,x)),CNAME(__CONCAT(.__sys_,x));\
|
||||
_SYSCALL(x); \
|
||||
bso 2b
|
||||
|
||||
|
@ -69,14 +65,12 @@ ENTRY(__CONCAT(__sys_,x)); \
|
|||
ENTRY(__CONCAT(__sys_,x)); \
|
||||
.weak CNAME(__CONCAT(_,x)); \
|
||||
.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
|
||||
.weak CNAME(__CONCAT(._,x)); \
|
||||
.set CNAME(__CONCAT(._,x)),CNAME(__CONCAT(.__sys_,x));\
|
||||
_SYSCALL(x); \
|
||||
bnslr; \
|
||||
mflr %r0; \
|
||||
std %r0,16(%r1); \
|
||||
stdu %r1,-48(%r1); \
|
||||
bl PIC_PLT(CNAME(HIDENAME(cerror))); \
|
||||
bl CNAME(HIDENAME(cerror)); \
|
||||
nop; \
|
||||
addi %r1,%r1,48; \
|
||||
ld %r0,16(%r1); \
|
||||
|
@ -91,17 +85,13 @@ ENTRY(__CONCAT(__sys_,x)); \
|
|||
.set CNAME(x),CNAME(__CONCAT(__sys_,x)); \
|
||||
.weak CNAME(__CONCAT(_,x)); \
|
||||
.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
|
||||
.weak CNAME(__CONCAT(.,x)); \
|
||||
.set CNAME(__CONCAT(.,x)),CNAME(__CONCAT(.__sys_,x));\
|
||||
.weak CNAME(__CONCAT(._,x)); \
|
||||
.set CNAME(__CONCAT(._,x)),CNAME(__CONCAT(.__sys_,x));\
|
||||
_SYSCALL(x); \
|
||||
bnslr; \
|
||||
\
|
||||
mflr %r0; \
|
||||
std %r0,16(%r1); \
|
||||
stdu %r1,-48(%r1); \
|
||||
bl PIC_PLT(CNAME(HIDENAME(cerror))); \
|
||||
bl CNAME(HIDENAME(cerror)); \
|
||||
nop; \
|
||||
addi %r1,%r1,48; \
|
||||
ld %r0,16(%r1); \
|
||||
|
|
|
@ -38,12 +38,13 @@
|
|||
blrl /* branch to start function */
|
||||
mr %r3,%r15 /* pass pointer to ucontext as argument */
|
||||
nop
|
||||
bl PIC_PLT(CNAME(_ctx_done)) /* branch to ctxt completion func */
|
||||
bl CNAME(_ctx_done) /* branch to ctxt completion func */
|
||||
/*
|
||||
* we should never return from the
|
||||
* above branch.
|
||||
*/
|
||||
nop
|
||||
bl PIC_PLT(CNAME(abort)) /* abort */
|
||||
bl CNAME(abort) /* abort */
|
||||
nop
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
|
|
@ -63,7 +63,7 @@ ENTRY(brk)
|
|||
mflr %r0
|
||||
std %r0,16(%r1)
|
||||
stdu %r1,-48(%r1)
|
||||
bl PIC_PLT(HIDENAME(cerror))
|
||||
bl HIDENAME(cerror)
|
||||
nop
|
||||
ld %r1,0(%r1)
|
||||
ld %r0,16(%r1)
|
||||
|
|
|
@ -45,7 +45,7 @@ ENTRY(HIDENAME(cerror))
|
|||
std %r31,48(%r1)
|
||||
|
||||
mr %r31,%r3 /* stash errval in callee-saved register */
|
||||
bl PIC_PLT(CNAME(__error))
|
||||
bl CNAME(__error)
|
||||
nop
|
||||
stw %r31,0(%r3) /* store errval into &errno */
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ ENTRY(exect)
|
|||
mflr %r0
|
||||
std %r0,16(%r1)
|
||||
stdu %r1,-48(%r1)
|
||||
bl PIC_PLT(HIDENAME(cerror))
|
||||
bl HIDENAME(cerror)
|
||||
nop
|
||||
ld %r1,0(%r1)
|
||||
ld %r0,16(%r1)
|
||||
|
|
|
@ -43,7 +43,7 @@ ENTRY(pipe)
|
|||
mflr %r0
|
||||
std %r0,16(%r1)
|
||||
stdu %r1,-48(%r1)
|
||||
bl PIC_PLT(HIDENAME(cerror))
|
||||
bl HIDENAME(cerror)
|
||||
nop
|
||||
ld %r1,0(%r1)
|
||||
ld %r0,16(%r1)
|
||||
|
|
|
@ -39,7 +39,7 @@ ENTRY(ptrace)
|
|||
std %r5,56(%r1)
|
||||
stw %r6,64(%r1)
|
||||
|
||||
bl PIC_PLT(CNAME(__error))
|
||||
bl CNAME(__error)
|
||||
nop
|
||||
li %r7,0
|
||||
stw %r7,0(%r3)
|
||||
|
@ -57,7 +57,7 @@ ENTRY(ptrace)
|
|||
blr
|
||||
1:
|
||||
stdu %r1,-48(%r1) /* lr already saved */
|
||||
bl PIC_PLT(HIDENAME(cerror))
|
||||
bl HIDENAME(cerror)
|
||||
nop
|
||||
ld %r1,0(%r1)
|
||||
ld %r0,16(%r1)
|
||||
|
|
|
@ -58,7 +58,7 @@ ENTRY(sbrk)
|
|||
mflr %r0
|
||||
std %r0,16(%r1)
|
||||
stdu %r1,-48(%r1)
|
||||
bl PIC_PLT(HIDENAME(cerror))
|
||||
bl HIDENAME(cerror)
|
||||
nop
|
||||
ld %r1,0(%r1)
|
||||
ld %r0,16(%r1)
|
||||
|
|
|
@ -65,7 +65,7 @@ _ENTRY(_rtld_start)
|
|||
ld %r4,-0x8000(%r2) /* First TOC entry is TOC base */
|
||||
subf %r4,%r4,%r2 /* Subtract from real TOC base to get base */
|
||||
|
||||
bl .reloc_non_plt_self /* reloc_non_plt_self(&_DYNAMIC,base) */
|
||||
bl reloc_non_plt_self /* reloc_non_plt_self(&_DYNAMIC,base) */
|
||||
nop
|
||||
|
||||
/*
|
||||
|
@ -80,7 +80,7 @@ _ENTRY(_rtld_start)
|
|||
addi %r4,%r1,128 /* &exit_proc on stack */
|
||||
addi %r5,%r1,120 /* &obj_main on stack */
|
||||
|
||||
bl ._rtld /* &_start = _rtld(sp, &exit_proc, &obj_main)*/
|
||||
bl _rtld /* &_start = _rtld(sp, &exit_proc, &obj_main)*/
|
||||
nop
|
||||
ld %r2,8(%r3)
|
||||
ld %r11,16(%r3)
|
||||
|
@ -133,7 +133,7 @@ _ENTRY(_rtld_bind_start)
|
|||
|
||||
ld %r3,0(%r11)
|
||||
ld %r4,8(%r11)
|
||||
bl ._rtld_bind # target addr = _rtld_bind(obj, reloff)
|
||||
bl _rtld_bind # target addr = _rtld_bind(obj, reloff)
|
||||
nop
|
||||
|
||||
ld %r2,8(%r3)
|
||||
|
|
|
@ -81,6 +81,13 @@ CFLAGS+= -msoft-float -mno-altivec
|
|||
INLINE_LIMIT?= 15000
|
||||
.endif
|
||||
|
||||
#
|
||||
# Use dot symbols on powerpc64 to make ddb happy
|
||||
#
|
||||
.if ${MACHINE_ARCH} == "powerpc64"
|
||||
CFLAGS+= -mcall-aixdesc
|
||||
.endif
|
||||
|
||||
#
|
||||
# For MIPS we also tell gcc to use floating point emulation
|
||||
#
|
||||
|
|
|
@ -174,7 +174,7 @@ ASENTRY(__start)
|
|||
insrdi 9,8,1,0
|
||||
mtmsrd 9
|
||||
|
||||
bl .OF_initial_setup
|
||||
bl OF_initial_setup
|
||||
nop
|
||||
|
||||
lis 4,end@ha
|
||||
|
@ -188,14 +188,14 @@ ASENTRY(__start)
|
|||
mr 6,20
|
||||
mr 7,21
|
||||
|
||||
bl .powerpc_init
|
||||
bl powerpc_init
|
||||
nop
|
||||
mr %r1, %r3
|
||||
li %r3, 0
|
||||
std %r3, 0(%r1)
|
||||
bl .mi_startup
|
||||
bl mi_startup
|
||||
nop
|
||||
b .OF_exit
|
||||
b OF_exit
|
||||
nop
|
||||
|
||||
/*
|
||||
|
|
|
@ -121,7 +121,7 @@ ENTRY(cpu_switch)
|
|||
/* Save FPU context if needed */
|
||||
andi. %r7, %r7, PCB_FPU
|
||||
beq .L1
|
||||
bl .save_fpu
|
||||
bl save_fpu
|
||||
nop
|
||||
|
||||
.L1:
|
||||
|
@ -130,12 +130,12 @@ ENTRY(cpu_switch)
|
|||
/* Save Altivec context if needed */
|
||||
andi. %r7, %r7, PCB_VEC
|
||||
beq .L2
|
||||
bl .save_vec
|
||||
bl save_vec
|
||||
nop
|
||||
|
||||
.L2:
|
||||
mr %r3,%r14 /* restore old thread ptr */
|
||||
bl .pmap_deactivate /* Deactivate the current pmap */
|
||||
bl pmap_deactivate /* Deactivate the current pmap */
|
||||
nop
|
||||
|
||||
addi %r1,%r1,48
|
||||
|
@ -161,7 +161,7 @@ blocked_loop:
|
|||
stdu %r1,-48(%r1)
|
||||
|
||||
mr %r3,%r15 /* Get new thread ptr */
|
||||
bl .pmap_activate /* Activate the new address space */
|
||||
bl pmap_activate /* Activate the new address space */
|
||||
nop
|
||||
|
||||
lwz %r6, PCB_FLAGS(%r17)
|
||||
|
@ -169,7 +169,7 @@ blocked_loop:
|
|||
andi. %r6, %r6, PCB_FPU
|
||||
beq .L3
|
||||
mr %r3,%r15 /* Pass curthread to enable_fpu */
|
||||
bl .enable_fpu
|
||||
bl enable_fpu
|
||||
nop
|
||||
|
||||
.L3:
|
||||
|
@ -178,7 +178,7 @@ blocked_loop:
|
|||
andi. %r6, %r6, PCB_VEC
|
||||
beq .L4
|
||||
mr %r3,%r15 /* Pass curthread to enable_vec */
|
||||
bl .enable_vec
|
||||
bl enable_vec
|
||||
nop
|
||||
|
||||
/* thread to restore is in r3 */
|
||||
|
@ -276,7 +276,7 @@ ENTRY(fork_trampoline)
|
|||
ld %r5,CF_ARG1(%r1)
|
||||
|
||||
stdu %r1,-48(%r1)
|
||||
bl .fork_exit
|
||||
bl fork_exit
|
||||
nop
|
||||
addi %r1,%r1,48+CF_SIZE-FSP /* Allow 8 bytes in front of
|
||||
trapframe to simulate FRAME_SETUP
|
||||
|
|
|
@ -295,14 +295,14 @@ cpu_reset:
|
|||
lis %r3,tocbase@ha
|
||||
ld %r2,tocbase@l(%r3)
|
||||
lis %r3,1@l
|
||||
bl CNAME(.cpudep_ap_early_bootstrap) /* Set PCPU */
|
||||
bl CNAME(cpudep_ap_early_bootstrap) /* Set PCPU */
|
||||
nop
|
||||
bl CNAME(.pmap_cpu_bootstrap) /* Turn on virtual memory */
|
||||
bl CNAME(pmap_cpu_bootstrap) /* Turn on virtual memory */
|
||||
nop
|
||||
bl CNAME(.cpudep_ap_bootstrap) /* Set up PCPU and stack */
|
||||
bl CNAME(cpudep_ap_bootstrap) /* Set up PCPU and stack */
|
||||
nop
|
||||
mr %r1,%r3 /* Use new stack */
|
||||
bl CNAME(.machdep_ap_bootstrap) /* And away! */
|
||||
bl CNAME(machdep_ap_bootstrap) /* And away! */
|
||||
nop
|
||||
|
||||
/* Should not be reached */
|
||||
|
@ -510,7 +510,7 @@ trapagain:
|
|||
lis %r3,tocbase@ha
|
||||
ld %r2,tocbase@l(%r3)
|
||||
addi %r3,%r1,48
|
||||
bl CNAME(.powerpc_interrupt)
|
||||
bl CNAME(powerpc_interrupt)
|
||||
nop
|
||||
|
||||
.globl CNAME(trapexit) /* backtrace code sentinel */
|
||||
|
@ -538,7 +538,7 @@ CNAME(trapexit):
|
|||
lis %r3,tocbase@ha
|
||||
ld %r2,tocbase@l(%r3)
|
||||
addi %r3,%r1,48
|
||||
bl CNAME(.ast)
|
||||
bl CNAME(ast)
|
||||
nop
|
||||
.globl CNAME(asttrapexit) /* backtrace code sentinel #2 */
|
||||
CNAME(asttrapexit):
|
||||
|
@ -587,7 +587,7 @@ dbtrap:
|
|||
lis %r3,tocbase@ha
|
||||
ld %r2,tocbase@l(%r3)
|
||||
addi %r3,%r1,48
|
||||
bl CNAME(.db_trap_glue)
|
||||
bl CNAME(db_trap_glue)
|
||||
nop
|
||||
or. %r3,%r3,%r3
|
||||
bne dbleave
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifdef PIC
|
||||
#if defined(PIC) && !defined(__powerpc64__)
|
||||
#define PIC_PROLOGUE XXX
|
||||
#define PIC_EPILOGUE XXX
|
||||
#define PIC_PLT(x) x@plt
|
||||
|
@ -53,11 +53,6 @@
|
|||
#define PIC_GOT(x) x
|
||||
#endif
|
||||
|
||||
#ifdef __powerpc64__
|
||||
#undef PIC_PLT
|
||||
#define PIC_PLT(x) __CONCAT(.,x)
|
||||
#endif
|
||||
|
||||
#define CNAME(csym) csym
|
||||
#define ASMNAME(asmsym) asmsym
|
||||
#ifdef __powerpc64__
|
||||
|
@ -73,8 +68,8 @@
|
|||
#define _ENTRY(x) \
|
||||
.text; .align 2; .globl x; .section ".opd","aw"; \
|
||||
.align 3; x: \
|
||||
.quad .x,.TOC.@tocbase,0; .previous; \
|
||||
.align 4; .globl .x; .type .x,@function; .x:
|
||||
.quad .L.x,.TOC.@tocbase,0; .size x,24; .previous; \
|
||||
.align 4; .type x,@function; .L.x:
|
||||
#else
|
||||
#define _ENTRY(x) \
|
||||
.text; .align 4; .globl x; .type x,@function; x:
|
||||
|
|
|
@ -83,13 +83,12 @@ __asm( " .text \n" \
|
|||
" .section \".opd\",\"aw\" \n" \
|
||||
" .align 3 \n" \
|
||||
"_mcount: \n" \
|
||||
" .quad ._mcount,.TOC.@tocbase,0 \n" \
|
||||
" .quad .L._mcount,.TOC.@tocbase,0\n" \
|
||||
" .previous \n" \
|
||||
" .type _mcount,@function \n" \
|
||||
" .align 4 \n" \
|
||||
" .globl ._mcount \n" \
|
||||
" .type ._mcount,@function \n" \
|
||||
"._mcount: \n" \
|
||||
" stdu %r1,-(288+120)(%r1) \n" \
|
||||
".L._mcount: \n" \
|
||||
" stdu %r1,-(288+128)(%r1) \n" \
|
||||
" std %r3,48(%r1) \n" \
|
||||
" std %r4,56(%r1) \n" \
|
||||
" std %r5,64(%r1) \n" \
|
||||
|
@ -103,7 +102,7 @@ __asm( " .text \n" \
|
|||
" ld %r3,0(%r1) \n" \
|
||||
" ld %r3,0(%r3) \n" \
|
||||
" ld %r3,16(%r3) \n" \
|
||||
" bl .__mcount \n" \
|
||||
" bl __mcount \n" \
|
||||
" nop \n" \
|
||||
" ld %r4,112(%r1) \n" \
|
||||
" mtlr %r4 \n" \
|
||||
|
@ -115,7 +114,7 @@ __asm( " .text \n" \
|
|||
" ld %r8,88(%r1) \n" \
|
||||
" ld %r9,96(%r1) \n" \
|
||||
" ld %r10,104(%r1) \n" \
|
||||
" addi %r1,%r1,(288+120) \n" \
|
||||
" addi %r1,%r1,(288+128) \n" \
|
||||
" blr \n");
|
||||
#else
|
||||
|
||||
|
|
|
@ -362,18 +362,7 @@
|
|||
extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)))
|
||||
#endif
|
||||
#ifdef __STDC__
|
||||
#ifdef __powerpc64__
|
||||
#define __weak_reference(sym,alias) \
|
||||
__asm__(".weak " #alias); \
|
||||
__asm__(".equ " #alias ", " #sym); \
|
||||
__asm__(".weak ." #alias); \
|
||||
__asm__(".equ ." #alias ", ." #sym)
|
||||
#else
|
||||
#define __weak_reference(sym,alias) \
|
||||
__asm__(".weak " #alias); \
|
||||
__asm__(".equ " #alias ", " #sym)
|
||||
#endif
|
||||
#define __weak_reference_data(sym,alias)\
|
||||
__asm__(".weak " #alias); \
|
||||
__asm__(".equ " #alias ", " #sym)
|
||||
#define __warn_references(sym,msg) \
|
||||
|
|
Loading…
Reference in a new issue