Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: linux_syscall_support.h

Issue 8230025: Fix a text relocation when SYS_SYSCALL_ENTRYPOINT is defined. (Closed) Base URL: http://linux-syscall-support.googlecode.com/svn/trunk/lss/
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2005-2010, Google Inc. 1 /* Copyright (c) 2005-2010, Google Inc.
2 * All rights reserved. 2 * All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1474 ".common "SYS_SYSCALL_ENTRYPOINT",8,8\n" \ 1474 ".common "SYS_SYSCALL_ENTRYPOINT",8,8\n" \
1475 ".previous\n" \ 1475 ".previous\n" \
1476 /* Check the SYS_SYSCALL_ENTRYPOINT vector */ \ 1476 /* Check the SYS_SYSCALL_ENTRYPOINT vector */ \
1477 "push %%eax\n" \ 1477 "push %%eax\n" \
1478 "call 10000f\n" \ 1478 "call 10000f\n" \
1479 "10000:pop %%eax\n" \ 1479 "10000:pop %%eax\n" \
1480 "add $_GLOBAL_OFFSET_TABLE_+[.-10000b], %%eax\n" \ 1480 "add $_GLOBAL_OFFSET_TABLE_+[.-10000b], %%eax\n" \
1481 "mov "SYS_SYSCALL_ENTRYPOINT"@GOT(%%eax), %%eax\n"\ 1481 "mov "SYS_SYSCALL_ENTRYPOINT"@GOT(%%eax), %%eax\n"\
1482 "mov 0(%%eax), %%eax\n" \ 1482 "mov 0(%%eax), %%eax\n" \
1483 "test %%eax, %%eax\n" \ 1483 "test %%eax, %%eax\n" \
1484 "jz 10001f\n" \ 1484 "jz 10002f\n" \
1485 "push %%eax\n" \ 1485 "push %%eax\n" \
1486 "lea 10002f, %%eax\n" \ 1486 "call 10001f\n" \
1487 "10001:pop %%eax\n" \
1488 "add $(10003f-10001b), %%eax\n" \
1487 "xchg 4(%%esp), %%eax\n" \ 1489 "xchg 4(%%esp), %%eax\n" \
1488 "ret\n" \ 1490 "ret\n" \
1489 "10001:pop %%eax\n" \ 1491 "10002:pop %%eax\n" \
1490 "int $0x80\n" \ 1492 "int $0x80\n" \
1491 "10002:\n" 1493 "10003:\n"
1492 #else 1494 #else
1493 #define LSS_ENTRYPOINT "int $0x80\n" 1495 #define LSS_ENTRYPOINT "int $0x80\n"
1494 #endif 1496 #endif
1495 #undef LSS_BODY 1497 #undef LSS_BODY
1496 #define LSS_BODY(type,args...) \ 1498 #define LSS_BODY(type,args...) \
1497 long __res; \ 1499 long __res; \
1498 __asm__ __volatile__("push %%ebx\n" \ 1500 __asm__ __volatile__("push %%ebx\n" \
1499 "movl %2,%%ebx\n" \ 1501 "movl %2,%%ebx\n" \
1500 LSS_ENTRYPOINT \ 1502 LSS_ENTRYPOINT \
1501 "pop %%ebx" \ 1503 "pop %%ebx" \
(...skipping 1962 matching lines...) Expand 10 before | Expand all | Expand 10 after
3464 } 3466 }
3465 #endif 3467 #endif
3466 #endif 3468 #endif
3467 3469
3468 #if defined(__cplusplus) && !defined(SYS_CPLUSPLUS) 3470 #if defined(__cplusplus) && !defined(SYS_CPLUSPLUS)
3469 } 3471 }
3470 #endif 3472 #endif
3471 3473
3472 #endif 3474 #endif
3473 #endif 3475 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698