]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - elf/dl-symaddr.c
Update copyright dates not handled by scripts/update-copyrights.
[thirdparty/glibc.git] / elf / dl-symaddr.c
index 3c850ca835b5ddd462ad9235faa15c6614f01ed9..4850da2dd591f9743f87ba6df45e0db9c46e26d3 100644 (file)
@@ -1,5 +1,5 @@
 /* Get the symbol address.  Generic version.
-   Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1999-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -13,9 +13,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #include <ldsodefs.h>
 #include <dl-fptr.h>
@@ -23,7 +22,7 @@
 void *
 _dl_symbol_address (struct link_map *map, const ElfW(Sym) *ref)
 {
-  ElfW(Addr) value = (map ? map->l_addr : 0) + ref->st_value;
+  ElfW(Addr) value = SYMBOL_ADDRESS (map, ref, false);
 
   /* Return the pointer to function descriptor. */
   if (ELFW(ST_TYPE) (ref->st_info) == STT_FUNC)
@@ -31,3 +30,4 @@ _dl_symbol_address (struct link_map *map, const ElfW(Sym) *ref)
   else
     return (void *) value;
 }
+rtld_hidden_def (_dl_symbol_address)