1 .globl bar 2 .globl foo 3 4 .section .bar 5 bar: 6 .4byte foo-. 7 .4byte baz-. 8 call foo 9 call baz 10 foo: 11 12 .section .data 13 baz: 14 .4byte foo-. 15 #.4byte .-foo # illegal 16 .4byte baz-. 17 .4byte .-baz 18 .4byte foo+4-. # with constant 19 .4byte .-baz+foo+4-. # both local and cross-segment (legal) 20 #.4byte baz+foo+4-.-. # ditto, slightly different - GAS gets confused on this 21 #.4byte (bar-.)+(foo-.) # illegal (too many cross-segment) 22 .4byte baz-.+baz-. # two from same segment 23 24 .section .text 25 movl $5, foo-. 26 movl $(foo-.), %eax 27 call foo 28