Changes in uspace/app/dltest/dltest.c [32254d6:8e3bc063] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/dltest/dltest.c
r32254d6 r8e3bc063 1 1 /* 2 * Copyright (c) 20 24Jiri Svoboda2 * Copyright (c) 2016 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 571 571 #ifdef DLTEST_LINKED 572 572 573 /** Test if we can read the correct value of a public pointer variable.574 *575 * dl_public_ptr_var is initialized in libdltest to point to dl_public_var.576 * This is done using a relocation. The main program (unless compiled with577 * PIC or PIE) will contain a copy of dl_public_ptr_var. This needs578 * to be copied using a COPY relocation. The relocations in the main579 * program need to be processed after the relocations in the shared580 * libraries (so that we copy the correct value).581 */582 static bool test_public_ptr_var(void)583 {584 int *ptr;585 586 printf("Read dl_public_ptr_var directly...\n");587 ptr = dl_public_ptr_var;588 589 if (ptr != &dl_public_var) {590 printf("FAILED\n");591 return false;592 }593 594 printf("Passed\n");595 return true;596 }597 598 573 /** Test directly calling function that returns a constant */ 599 574 static bool test_lnk_dl_get_constant(void) … … 944 919 return 1; 945 920 946 #ifndef STATIC_EXE // FIXME: this define is not set anywhere 947 921 #ifndef STATIC_EXE 948 922 if (!test_dlfcn_dl_get_private_fib_var()) 949 923 return 1; … … 1000 974 1001 975 if (!test_lnk_read_public_uvar()) 1002 return 1;1003 1004 if (!test_public_ptr_var())1005 976 return 1; 1006 977
Note:
See TracChangeset
for help on using the changeset viewer.