Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Jan 2017 23:57:52 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-toolchain@FreeBSD.org
Subject:   [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
Message-ID:  <bug-215819-29464-KYWLEMNhd7@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-215819-29464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-215819-29464@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help

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

--- Comment #4 from Mark Millard <markmi@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.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-215819-29464-KYWLEMNhd7>