1178173Simp// ver_test_7.cc -- test weak duplicate symbol with version 2178173Simp 3178173Simp// Copyright 2008 Free Software Foundation, Inc. 4178173Simp// Written by Ian Lance Taylor <iant@google.com> 5178173Simp 6178173Simp// This file is part of gold. 7178173Simp 8178173Simp// This program is free software; you can redistribute it and/or modify 9178173Simp// it under the terms of the GNU General Public License as published by 10178173Simp// the Free Software Foundation; either version 3 of the License, or 11178173Simp// (at your option) any later version. 12178173Simp 13178173Simp// This program is distributed in the hope that it will be useful, 14178173Simp// but WITHOUT ANY WARRANTY; without even the implied warranty of 15178173Simp// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16178173Simp// GNU General Public License for more details. 17178173Simp 18178173Simp// You should have received a copy of the GNU General Public License 19178173Simp// along with this program; if not, write to the Free Software 20178173Simp// Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 21178173Simp// MA 02110-1301, USA. 22178173Simp 23178173Simp#include "ver_test.h" 24178173Simp 25178173Simp// This tests having a weak symbol which matches an entry in the 26178173Simp// version script following a hidden definition from .symver. There 27178173Simp// was a bug in which the weak symbol would cause the earlier symbol 28178173Simp// to become globally visible when it should have been hidden. 29178173Simp 30178173Simpextern "C" int t2_2() __attribute__ ((weak)); 31178173Simp 32178173Simpextern "C" 33178173Simpint 34178173Simpt2_2() 35178173Simp{ 36178173Simp return 23; 37178173Simp} 38178173Simp