mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
b6b4298372
On x86-64, function pointers in executable for external funtions may be resolved to their PLT entries in executable. If it happens, function pointers of protected funtions in shared libraries must be resolved to the PLT entries in executable, not addresses of protected funtions in shared libraries. PR ld/27973 * testsuite/ld-x86-64/x86-64.exp: Run protected function tests. * testsuite/ld-x86-64/protected-func-1.h: New file. * testsuite/ld-x86-64/protected-func-1a.s: Likewise. * testsuite/ld-x86-64/protected-func-1b.c: Likewise.
7 lines
228 B
C
7 lines
228 B
C
extern int protected_func_1a (void);
|
|
extern int protected_func_1b (void);
|
|
|
|
typedef int (*protected_func_type) (void);
|
|
extern protected_func_type protected_func_1a_p (void);
|
|
extern protected_func_type protected_func_1b_p (void);
|