As mentioned earlier, the major difference without -pie is that the value of edi is initialized correctly before it's contents are put on the stack before calling pthread_mutex_lock:
804f250: 65 a1 00 00 00 00 mov %gs:0x0,%eax 804f256: 90 nop 804f257: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 804f25b: 8d 15 fc ff ff ff lea 0xfffffffc,%edx 804f261: 89 55 e4 mov %edx,-0x1c(%ebp) 804f264: 8b 3c 02 mov (%edx,%eax,1),%edi 804f267: 85 ff test %edi,%edi
As mentioned earlier, the major difference without -pie is that the value of edi is initialized correctly before it's contents are put on the stack before calling pthread_mutex_lock:
804f250: 65 a1 00 00 00 00 mov %gs:0x0,%eax %eiz,1) ,%esi
804f256: 90 nop
804f257: 8d 74 26 00 lea 0x0(%esi,
804f25b: 8d 15 fc ff ff ff lea 0xfffffffc,%edx
804f261: 89 55 e4 mov %edx,-0x1c(%ebp)
804f264: 8b 3c 02 mov (%edx,%eax,1),%edi
804f267: 85 ff test %edi,%edi