2017-04-08 14:14:14 +08:00
# REQUIRES : x8 6
# RUN : llvm- m c - f i l e t y p e =obj - t r i p l e =i686 - p c - l i n u x % s - o % t . o
# RUN : ld. l l d % t . o - o % t
# RUN : llvm- o b j d u m p - s e c t i o n - h e a d e r s - d % t | F i l e C h e c k % s
# # We h a v e R _ 3 8 6 _ G O T 3 2 r e l o c a t i o n h e r e .
.globl foo
.type foo, @function
foo :
nop
_start :
movl f o o @GOT, %ebx
# # 7 3 7 2 8 = = 0 x1 2 0 0 0 = = A D D R ( . g o t )
# CHECK : _start :
Align AArch64 and i386 image base to superpage
Summary:
As for x86_64, the default image base for AArch64 and i386 should be
aligned to a superpage appropriate for the architecture.
On AArch64, this is 2 MiB, on i386 it is 4 MiB.
Reviewers: emaste, grimar, javed.absar, espindola, ruiu, peter.smith, srhines, rprichard
Reviewed By: ruiu, peter.smith
Subscribers: jfb, markj, arichardson, krytarowski, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D50297
llvm-svn: 342746
2018-09-22 00:58:13 +08:00
# CHECK- N E X T : 4 0 1 0 0 1 : 8 b 1 d { { . * } } m o v l 4 2 0 2 4 9 6 , % e b x
2017-04-08 14:14:14 +08:00
# CHECK : Sections :
2019-01-28 23:03:47 +08:00
# CHECK : Name S i z e V M A
Align AArch64 and i386 image base to superpage
Summary:
As for x86_64, the default image base for AArch64 and i386 should be
aligned to a superpage appropriate for the architecture.
On AArch64, this is 2 MiB, on i386 it is 4 MiB.
Reviewers: emaste, grimar, javed.absar, espindola, ruiu, peter.smith, srhines, rprichard
Reviewed By: ruiu, peter.smith
Subscribers: jfb, markj, arichardson, krytarowski, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D50297
llvm-svn: 342746
2018-09-22 00:58:13 +08:00
# CHECK : .got 00000004 0 0 0 0 0 0 0 0 0 0 4 0 2 0 0 0
2017-04-08 14:14:14 +08:00
# RUN : not l d . l l d % t . o - o % t - p i e 2 > & 1 | F i l e C h e c k % s - - c h e c k - p r e f i x =ERR
2018-03-15 06:05:12 +08:00
# ERR : error : 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 _ 3 8 6 _ G O T 3 2 a g a i n s t s y m b o l : f o 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