diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-12-10 02:28:43 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-12-10 02:28:43 +0000 |
commit | f3aefb56def210eb0c23ecb8f2e0bf7f4be78a37 (patch) | |
tree | 912113a0c5c054b3d8f1304ae99c96640ecd1fb8 /test | |
parent | fa1948a40f14d98c1a31a2ec19035a2d5254e854 (diff) | |
download | llvm-f3aefb56def210eb0c23ecb8f2e0bf7f4be78a37.tar.gz llvm-f3aefb56def210eb0c23ecb8f2e0bf7f4be78a37.tar.bz2 llvm-f3aefb56def210eb0c23ecb8f2e0bf7f4be78a37.tar.xz |
Handle expressions of the form _GLOBAL_OFFSET_TABLE_-symbol the same way gas
does. The _GLOBAL_OFFSET_TABLE_ is still magical in that we get a R_386_GOTPC,
but it doesn't change the immediate in the same way as when the expression
has no right hand side symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146311 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/MC/ELF/global-offset.s | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/MC/ELF/global-offset.s b/test/MC/ELF/global-offset.s index 8cc5dbb8d8..81ae5d785d 100644 --- a/test/MC/ELF/global-offset.s +++ b/test/MC/ELF/global-offset.s @@ -6,6 +6,10 @@ addl $_GLOBAL_OFFSET_TABLE_, %ebx leal _GLOBAL_OFFSET_TABLE_(%ebx), %ebx +// But not in this case +foo: + addl _GLOBAL_OFFSET_TABLE_-foo,%ebx + // CHECK: ('sh_name', 0x00000005) # '.text' // CHECK-NEXT: ('sh_type', // CHECK-NEXT: ('sh_flags', @@ -16,4 +20,4 @@ // CHECK-NEXT: ('sh_info', // CHECK-NEXT: ('sh_addralign', // CHECK-NEXT: ('sh_entsize', -// CHECK-NEXT: ('_section_data', '81c30200 00008d9b 02000000') +// CHECK-NEXT: ('_section_data', '81c30200 00008d9b 02000000 031d0200 0000') |