Date: Mon, 5 Aug 2019 01:37:18 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350578 - in head/sys/powerpc: ofw powerpc Message-ID: <201908050137.x751bII0016433@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Mon Aug 5 01:37:18 2019 New Revision: 350578 URL: https://svnweb.freebsd.org/changeset/base/350578 Log: powerpc: Get 32-bit AIM building with secure-PLT The last few changes needed before 32-bit AIM builds with secure-PLT with base GCC. Because ofwcall32.S and swtch32.S were branching to the GOT it could not use secure PLT. Modified: head/sys/powerpc/ofw/ofwcall32.S head/sys/powerpc/powerpc/swtch32.S Modified: head/sys/powerpc/ofw/ofwcall32.S ============================================================================== --- head/sys/powerpc/ofw/ofwcall32.S Mon Aug 5 00:32:57 2019 (r350577) +++ head/sys/powerpc/ofw/ofwcall32.S Mon Aug 5 01:37:18 2019 (r350578) @@ -67,8 +67,11 @@ ASENTRY(ofwcall) mfmsr %r6 /* GOT pointer in r7 */ - bl _GLOBAL_OFFSET_TABLE_@local-4 + bl 1f +1: mflr %r7 + addis %r7,%r7,(_GLOBAL_OFFSET_TABLE_-1b)@ha + addi %r7,%r7,(_GLOBAL_OFFSET_TABLE_-1b)@l /* read client interface handler */ lwz %r4,openfirmware_entry@got(%r7) @@ -129,8 +132,11 @@ ASENTRY(rtascall) stw %r0,4(%r1) /* GOT pointer in r7 */ - bl _GLOBAL_OFFSET_TABLE_@local-4 + bl 1f +1: mflr %r7 + addis %r7,%r7,(_GLOBAL_OFFSET_TABLE_-1b)@ha + addi %r7,%r7,(_GLOBAL_OFFSET_TABLE_-1b)@l /* Record the old MSR to real-mode-accessible area */ mfmsr %r0 @@ -152,8 +158,11 @@ ASENTRY(rtascall) bctrl /* GOT pointer in r7 */ - bl _GLOBAL_OFFSET_TABLE_@local-4 + bl 1f +1: mflr %r7 + addis %r7,%r7,(_GLOBAL_OFFSET_TABLE_-1b)@ha + addi %r7,%r7,(_GLOBAL_OFFSET_TABLE_-1b)@l /* Now set the MSR back */ lwz %r6,rtas_regsave@got(%r7) Modified: head/sys/powerpc/powerpc/swtch32.S ============================================================================== --- head/sys/powerpc/powerpc/swtch32.S Mon Aug 5 00:32:57 2019 (r350577) +++ head/sys/powerpc/powerpc/swtch32.S Mon Aug 5 01:37:18 2019 (r350578) @@ -124,8 +124,11 @@ ENTRY(cpu_switch) cpu_switchin: #if defined(SMP) && defined(SCHED_ULE) /* Wait for the new thread to become unblocked */ - bl _GLOBAL_OFFSET_TABLE_@local-4 + bl 1f +1: mflr %r6 + addis %r6,%r6,(_GLOBAL_OFFSET_TABLE_-1b)@ha + addi %r6,%r6,(_GLOBAL_OFFSET_TABLE_-1b)@l lwz %r6,blocked_lock@got(%r6) blocked_loop: lwz %r7,TD_LOCK(%r2)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908050137.x751bII0016433>