1 # RUN: llvm-mc -triple=i386-unknown-linux-gnu -filetype=obj -o %t %s
2 # RUN: llvm-jitlink -noexec %t
4 # Check that symbol scope is demoted to local when external symbols are
5 # converted to absolutes. This is demotion is necessary to avoid "unexpected
8 # The reference to _GLOBAL_OFFSET_TABLE_ will trigger creation of an external
9 # _GLOBAL_OFFSET_TABLE_ symbol, and the GOTOFF relocation will force creation
10 # of a GOT symbol without actually introducing any GOT entries. Together these
11 # should cause the external _GLOBAL_OFFSET_TABLE_ symbol to be converted to an
12 # absolute symbol with address zero. If the scope is not demoted correctly this
13 # will trigger an "unexpected definition" error.
27 addl $_GLOBAL_OFFSET_TABLE_+
(.Ltmp0-.L0$pb), %eax
29 movl
a@GOTOFF
(%eax
), %eax