📄 binutils-20040820-duplicates.patch
字号:
See http://sources.redhat.com/ml/binutils/2004-08/msg00256.htmlDate: Fri, 20 Aug 2004 21:13:43 -0400From: Daniel Jacobowitz <drow at false dot org>To: binutils at sources dot redhat dot comSubject: Re: Handle SEC_LINK_DUPLICATES_SAME_CONTENTS for arm-linuxMessage-ID: <20040821011342.GA30319@nevyn.them.org>Mail-Followup-To: binutils at sources dot redhat dot comReferences: <20040818145518.GA9774@nevyn.them.org> <20040819055040.GA11820@lucon.org> <20040819080034.GE21716@bubble.modra.org> <20040820173240.GA17678@nevyn.them.org> <20040821003737.GB16016@bubble.modra.org>In-Reply-To: <20040821003737 dot GB16016 at bubble dot modra dot org>On Sat, Aug 21, 2004 at 10:07:38AM +0930, Alan Modra wrote:> On Fri, Aug 20, 2004 at 01:32:40PM -0400, Daniel Jacobowitz wrote:> > Thanks. How's this?> > As you might have guessed from my rather slack review of your previous> patch, I trust you enough to give the OK without proper review. But> since you asked... :)Checked in as so.-- Daniel Jacobowitz2004-08-20 Daniel Jacobowitz <dan@debian.org> * elflink.c (_bfd_elf_section_already_linked): Handle SEC_LINK_DUPLICATES_SAME_CONTENTS.Index: elflink.c===================================================================RCS file: /big/fsf/rsync/src-cvs/src/bfd/elflink.c,vretrieving revision 1.97diff -u -p -r1.97 elflink.c--- binutils/bfd/elflink.c 18 Aug 2004 02:45:42 -0000 1.97+++ binutils/bfd/elflink.c 21 Aug 2004 00:59:08 -0000@@ -9366,6 +9366,36 @@ _bfd_elf_section_already_linked (bfd *ab (_("%B: duplicate section `%A' has different size\n"), abfd, sec); break;++ case SEC_LINK_DUPLICATES_SAME_CONTENTS:+ if (sec->size != l->sec->size)+ (*_bfd_error_handler)+ (_("%B: duplicate section `%A' has different size\n"),+ abfd, sec);+ else if (sec->size != 0)+ {+ bfd_byte *sec_contents, *l_sec_contents;++ if (!bfd_malloc_and_get_section (abfd, sec, &sec_contents))+ (*_bfd_error_handler)+ (_("%B: warning: could not read contents of section `%A'\n"),+ abfd, sec);+ else if (!bfd_malloc_and_get_section (l->sec->owner, l->sec,+ &l_sec_contents))+ (*_bfd_error_handler)+ (_("%B: warning: could not read contents of section `%A'\n"),+ l->sec->owner, l->sec);+ else if (memcmp (sec_contents, l_sec_contents, sec->size) != 0)+ (*_bfd_error_handler)+ (_("%B: warning: duplicate section `%A' has different contents\n"),+ abfd, sec);++ if (sec_contents)+ free (sec_contents);+ if (l_sec_contents)+ free (l_sec_contents);+ }+ break; } /* Set the output_section field so that lang_add_section
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -