2016-08-02 03:28:13 +08:00
/ / REQUIRES : arm
/ / RUN : llvm- m c - f i l e t y p e =obj - t r i p l e =armv7a - n o n e - l i n u x - g n u e a b i % s - o % t . o
/ / RUN : llvm- r e a d o b j - r % t . o | F i l e C h e c k % s - - c h e c k - p r e f i x =RELOC
/ / RUN : ld. l l d - s h a r e d % t . o - o % t 2 . s o - - t a r g e t 1 - r e l
/ / RUN : llvm- o b j d u m p - t - d % t 2 . s o | F i l e C h e c k % s \
/ / RUN : - - check- p r e f i x =RELATIVE
/ / RUN : not l d . l l d - s h a r e d % t . o - o % t 3 . s o 2 > & 1 | F i l e C h e c k % s \
/ / RUN : - - check- p r e f i x =ABS
2016-08-31 16:53:21 +08:00
/ / RUN : ld. l l d - s h a r e d % t . o - o % t 2 . s o - - t a r g e t 1 - a b s - - t a r g e t 1 - r e l
/ / RUN : llvm- o b j d u m p - t - d % t 2 . s o | F i l e C h e c k % s \
/ / RUN : - - check- p r e f i x =RELATIVE
/ / RUN : not l d . l l d - s h a r e d % t . o - o % t 3 . s o - - t a r g e t 1 - r e l - - t a r g e t 1 - a b s 2 > & 1 \
/ / RUN : | FileCheck % s - - c h e c k - p r e f i x =ABS
2016-08-02 03:28:13 +08:00
/ / RELOC : Relocations [
/ / RELOC : .rel .text {
/ / RELOC : 0 x0 R _ A R M _ T A R G E T 1 p a t a t i n o 0 x0
/ / RELOC : }
/ / RELOC : ]
.text
.word patatino( t a r g e t 1 )
patatino :
2017-03-31 21:08:49 +08:00
.word 32
/ / Force g e n e r a t i o n o f $ d . 0 a s s e c t i o n i s n o t a l l d a t a
nop
[llvm-objdump] Further rearrange llvm-objdump sections for compatability
Summary:
rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more.
I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump:
* Archive headers
* File headers
* Section headers
* Symbol table
* Dwarf debugging
* Relocations (if `--disassemble` is not used)
* Section contents
* Disassembly
Reviewers: jhenderson, justice_adams, grimar, ychen, espindola
Reviewed By: jhenderson
Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68066
llvm-svn: 373671
2019-10-04 06:01:08 +08:00
/ / RELATIVE : SYMBOL T A B L E :
/ / RELATIVE : 0 0 0 0 1 1 5 4 .text 00000000 patatino
2016-08-02 03:28:13 +08:00
/ / RELATIVE : Disassembly o f s e c t i o n . t e x t :
2019-05-01 18:40:48 +08:00
/ / RELATIVE- E M P T Y :
2016-08-02 03:28:13 +08:00
/ / RELATIVE : $ d. 0 :
2019-08-27 19:52:36 +08:00
/ / RELATIVE : 1150 : 0 4 0 0 0 0 0 0 .word 0x00000004
2016-08-02 03:28:13 +08:00
2018-03-15 06:05:12 +08:00
/ / ABS : can' t c r e a t e d y n a m i c r e l o c a t i o n R _ A R M _ T A R G E T 1 a g a i n s t s y m b o l : p a t a t i n o i n r e a d o n l y s e g m e n t ; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
2017-04-04 05:36:31 +08:00
/ / ABS : > > > defined i n { { . * } } . o
/ / ABS : > > > referenced b y { { . * } } . o : ( . t e x t + 0 x0 )