Involving devel/binutils at powerpc64 in buildworld buildkernel : got/toc optimization is not supported for addis %r1,%r1,TOC_REF(trapstk)@ha (and the like)

Mark Millard marklmi at yahoo.com
Tue Jan 7 06:52:26 UTC 2020


The following is based on what I noticed while
working on updating to head -r356426 ,  including
building multiple ways (discovering what fails
to build and such).

I was looking at messages and noticed that there
were messages such as:

--- kernel.full ---
locore.o: in function `dbtrap':
/usr/src/sys/powerpc/aim/trap_subr64.S:905:(.text+0xa68): got/toc optimization is not supported for 0x3c210000 instruction

That is the addis instruction in:

dbtrap:
        /* Write the trap vector to SPRG3 by computing LR & 0xff00 */
        mflr    %r1
        andi.   %r1,%r1,0xff00
        mtsprg3 %r1
 
        GET_TOCBASE(%r1)                        /* get new SP */
        addis   %r1,%r1,TOC_REF(trapstk)@ha
        ld      %r1,TOC_REF(trapstk)@l(%r1)
        addi    %r1,%r1,(TRAPSTKSZ-48)

(based on line number).

This was for system-clang and devel/binutils at powerpc64
being used to do the build.

But it also happened for devel/freebsd-gcc9 at powerpc64
and devel/binutils at powerpc64 bing used to do the
build:

--- kernel.full ---
locore.o: in function `dbtrap':
/usr/src/sys/powerpc/aim/trap_subr64.S:905:(.text+0xa68): got/toc optimization is not supported for 0x3c210000 instruction

(Same instruction, same message.)


There are lots of similar messages for other instruction
encodings for zfs.ko.full --but only for the
devel/freebsd-gcc9 at powerpc64 and devel/binutils at powerpc64
combination:

--- zfs.ko.full ---
zfs.kld: in function `acl_trivial_create':
/usr/src/sys/cddl/contrib/opensolaris/common/acl/acl_common.c:1646:(.text+0x568): got/toc optimization is not supported for 0x3d9e0000 instruction
zfs.kld: in function `cacl_malloc':
/usr/src/sys/cddl/contrib/opensolaris/common/acl/acl_common.c:243:(.text+0x5e0): got/toc optimization is not supported for 0x3d9e0000 instruction
zfs.kld: in function `ace_trivial':
/usr/src/sys/cddl/contrib/opensolaris/common/acl/acl_common.c:1764:(.text+0x990): got/toc optimization is not supported for 0x3d9e0000 instruction
zfs.kld: in function `avl_nearest':
. . .

The list for zfs.ko.full is large.

Overall there are examples of each of:

got/toc optimization is not supported for 0x3c210000 instruction
got/toc optimization is not supported for 0x3c9e0000 instruction
got/toc optimization is not supported for 0x3cbe0000 instruction
got/toc optimization is not supported for 0x3cde0000 instruction
got/toc optimization is not supported for 0x3cfe0000 instruction
got/toc optimization is not supported for 0x3d1e0000 instruction
got/toc optimization is not supported for 0x3d3e0000 instruction
got/toc optimization is not supported for 0x3d5e0000 instruction
got/toc optimization is not supported for 0x3d9e0000 instruction
got/toc optimization is not supported for 0x3dde0000 instruction
got/toc optimization is not supported for 0x3dfe0000 instruction
got/toc optimization is not supported for 0x3e1e0000 instruction
got/toc optimization is not supported for 0x3e3e0000 instruction
got/toc optimization is not supported for 0x3e5e0000 instruction
got/toc optimization is not supported for 0x3e7e0000 instruction
got/toc optimization is not supported for 0x3e9e0000 instruction
got/toc optimization is not supported for 0x3ebe0000 instruction
got/toc optimization is not supported for 0x3ede0000 instruction
got/toc optimization is not supported for 0x3efe0000 instruction
got/toc optimization is not supported for 0x3f1e0000 instruction
got/toc optimization is not supported for 0x3f3e0000 instruction
got/toc optimization is not supported for 0x3f5e0000 instruction
got/toc optimization is not supported for 0x3f7e0000 instruction
got/toc optimization is not supported for 0x3f9e0000 instruction
got/toc optimization is not supported for 0x3fbe0000 instruction

I'm not sure of the implications, but I figured that the
information might be of use at some point.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-ppc mailing list