1.globl bar 2.globl foo 3 4.section .bar 5bar: 6.4byte foo-. 7.4byte baz-. 8call foo 9call baz 10foo: 11 12.section .data 13baz: 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 25movl $5, foo-. 26movl $(foo-.), %eax 27call foo 28