1*7fd79137SRobert Mustacchi /* 2*7fd79137SRobert Mustacchi 3*7fd79137SRobert Mustacchi Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved. 4*7fd79137SRobert Mustacchi 5*7fd79137SRobert Mustacchi This program is free software; you can redistribute it and/or modify it 6*7fd79137SRobert Mustacchi under the terms of version 2.1 of the GNU Lesser General Public License 7*7fd79137SRobert Mustacchi as published by the Free Software Foundation. 8*7fd79137SRobert Mustacchi 9*7fd79137SRobert Mustacchi This program is distributed in the hope that it would be useful, but 10*7fd79137SRobert Mustacchi WITHOUT ANY WARRANTY; without even the implied warranty of 11*7fd79137SRobert Mustacchi MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12*7fd79137SRobert Mustacchi 13*7fd79137SRobert Mustacchi Further, this software is distributed without any warranty that it is 14*7fd79137SRobert Mustacchi free of the rightful claim of any third person regarding infringement 15*7fd79137SRobert Mustacchi or the like. Any license provided herein, whether implied or 16*7fd79137SRobert Mustacchi otherwise, applies only to this software file. Patent licenses, if 17*7fd79137SRobert Mustacchi any, provided herein do not apply to combinations of this program with 18*7fd79137SRobert Mustacchi other software, or any other product whatsoever. 19*7fd79137SRobert Mustacchi 20*7fd79137SRobert Mustacchi You should have received a copy of the GNU Lesser General Public 21*7fd79137SRobert Mustacchi License along with this program; if not, write the Free Software 22*7fd79137SRobert Mustacchi Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301, 23*7fd79137SRobert Mustacchi USA. 24*7fd79137SRobert Mustacchi 25*7fd79137SRobert Mustacchi Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane, 26*7fd79137SRobert Mustacchi Mountain View, CA 94043, or: 27*7fd79137SRobert Mustacchi 28*7fd79137SRobert Mustacchi http://www.sgi.com 29*7fd79137SRobert Mustacchi 30*7fd79137SRobert Mustacchi For further information regarding this notice, see: 31*7fd79137SRobert Mustacchi 32*7fd79137SRobert Mustacchi http://oss.sgi.com/projects/GenInfo/NoticeExplan 33*7fd79137SRobert Mustacchi 34*7fd79137SRobert Mustacchi */ 35*7fd79137SRobert Mustacchi 36*7fd79137SRobert Mustacchi 37*7fd79137SRobert Mustacchi 38*7fd79137SRobert Mustacchi #include "config.h" 39*7fd79137SRobert Mustacchi #include "libdwarfdefs.h" 40*7fd79137SRobert Mustacchi #include <stdio.h> 41*7fd79137SRobert Mustacchi #include <string.h> 42*7fd79137SRobert Mustacchi #ifdef HAVE_ELFACCESS_H 43*7fd79137SRobert Mustacchi #include <elfaccess.h> 44*7fd79137SRobert Mustacchi #endif 45*7fd79137SRobert Mustacchi #include "pro_incl.h" 46*7fd79137SRobert Mustacchi #include "pro_section.h" 47*7fd79137SRobert Mustacchi 48*7fd79137SRobert Mustacchi /* 49*7fd79137SRobert Mustacchi This function adds another weak name to the 50*7fd79137SRobert Mustacchi list of weak names for the given Dwarf_P_Debug. 51*7fd79137SRobert Mustacchi It returns 0 on error, and 1 otherwise. 52*7fd79137SRobert Mustacchi */ 53*7fd79137SRobert Mustacchi Dwarf_Unsigned 54*7fd79137SRobert Mustacchi dwarf_add_weakname(Dwarf_P_Debug dbg, 55*7fd79137SRobert Mustacchi Dwarf_P_Die die, 56*7fd79137SRobert Mustacchi char *weak_name, Dwarf_Error * error) 57*7fd79137SRobert Mustacchi { 58*7fd79137SRobert Mustacchi return 59*7fd79137SRobert Mustacchi _dwarf_add_simple_name_entry(dbg, die, weak_name, 60*7fd79137SRobert Mustacchi dwarf_snk_weakname, error); 61*7fd79137SRobert Mustacchi } 62