From f3aefb56def210eb0c23ecb8f2e0bf7f4be78a37 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sat, 10 Dec 2011 02:28:43 +0000 Subject: 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 --- test/MC/ELF/global-offset.s | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test') 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') -- cgit v1.2.3