[Bug 215819] head r311147's clang 3.9.1 for powerpc64: locore.o generation messed up: generates R_PPC64_ADDR16_DS instead of R_PPC64_TOC16_DS with .toc

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Jan 7 23:57:52 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215819

--- Comment #4 from Mark Millard <markmi at dsl-only.net> ---
(In reply to Mark Millard from comment #2)

The following locore64_simplified.S source code is sufficient to
show the silent R_PPC64_ADDR16_DS generation problem:

        .align  4
        .data
        .p2align 2
        .globl  tmpstk
        tmpstk:
        .space  16384

        .section ".toc","aw"
tmpstk.L: .tc tmpstk[TC],tmpstk

        .text
        ld      %r1,tmpstk.L(%r2)

# /usr/obj/powerpc64vtsc_clang_kernel/powerpc.powerpc64/usr/src/tmp/usr/bin/cc
\                                                                              
                                                                               
                                  -target powerpc64-unknown-freebsd12.0 \      
                                                                               
                                                                               
                                                                  
--sysroot=/usr/obj/powerpc64vtsc_clang_kernel/powerpc.powerpc64/usr/src/tmp \  
                                                                               
                                                                               
                                
-B/usr/obj/powerpc64vtsc_clang_kernel/powerpc.powerpc64/usr/src/tmp/usr/bin \  
                                                                               
                                                                               
                                 -c \                                          
                                                                               
                                                                               
                                                                  -x
assembler-with-cpp \                                                           
                                                                               
                                                                               
                              -pipe  \                                         
                                                                               
                                                                               
                                                              
locore64_simplified.S

# /usr/local/powerpc64-freebsd/bin/objdump -r locore64_simplified.o | more      
locore64_simplified.o:     file format elf64-powerpc-freebsd

RELOCATION RECORDS FOR [.text]:
OFFSET           TYPE              VALUE 
0000000000000002 R_PPC64_ADDR16_DS  .toc


RELOCATION RECORDS FOR [.toc]:
OFFSET           TYPE              VALUE 
0000000000000000 R_PPC64_ADDR64    tmpstk

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-toolchain mailing list