From: Ian Lance Taylor Date: Wed, 13 Jan 2010 16:01:05 +0000 (+0000) Subject: Bring over from mainline: X-Git-Tag: binutils-2_20_1~75 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d19990d53d574fd3c0b3876b98eb4d1a0cd84cf0;p=thirdparty%2Fbinutils-gdb.git Bring over from mainline: 2010-01-08 Ian Lance Taylor PR 11072 * layout.cc (Layout::include_section): Remove .gnu_debuglink sections. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 126a51d966e..d9c28706e86 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,12 @@ +2010-01-13 Ian Lance Taylor + + Bring over from mainline: + 2010-01-08 Ian Lance Taylor + + PR 11072 + * layout.cc (Layout::include_section): Remove .gnu_debuglink + sections. + 2009-11-06 Ian Lance Taylor Bring over from mainline: diff --git a/gold/layout.cc b/gold/layout.cc index 47b2867a8be..f9f378e8932 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -1,6 +1,6 @@ // layout.cc -- lay out output file sections for gold -// Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. // Written by Ian Lance Taylor . // This file is part of gold. @@ -349,6 +349,11 @@ Layout::include_section(Sized_relobj*, const char* name, if (is_prefix_of(".gnu.lto_", name)) return false; } + // The GNU linker strips .gnu_debuglink sections, so we do too. + // This is a feature used to keep debugging information in + // separate files. + if (strcmp(name, ".gnu_debuglink") == 0) + return false; return true; default: