1 ; RUN: llc -relocation-model=pic -data-sections -o - %s | FileCheck %s
3 target triple = "x86_64-unknown-linux-gnu"
5 @hidden = external hidden global i8
6 @default = external global i8
8 ; CHECK: .section .rodata.rodata
10 ; CHECK: .long hidden-rodata
11 @rodata = hidden constant i32 trunc (i64 sub (i64 ptrtoint (i8* @hidden to i64), i64 ptrtoint (i32* @rodata to i64)) to i32)
13 ; CHECK: .section .data.rel.ro.relro1
15 ; CHECK: .long default-relro1
16 @relro1 = hidden constant i32 trunc (i64 sub (i64 ptrtoint (i8* @default to i64), i64 ptrtoint (i32* @relro1 to i64)) to i32)
18 ; CHECK: .section .data.rel.ro.relro2
20 ; CHECK: .long hidden-relro2
21 @relro2 = constant i32 trunc (i64 sub (i64 ptrtoint (i8* @hidden to i64), i64 ptrtoint (i32* @relro2 to i64)) to i32)