diff --git a/binutils-2.17.50.0.17-build-id.patch b/binutils-2.17.50.0.17-build-id.patch index cbc3e5f..eadecac 100644 --- a/binutils-2.17.50.0.17-build-id.patch +++ b/binutils-2.17.50.0.17-build-id.patch @@ -293,11 +293,11 @@ Index: ld/emultempl/elf32.em =================================================================== RCS file: /cvs/src/src/ld/emultempl/elf32.em,v retrieving revision 1.179 -retrieving revision 1.181 -diff -b -u -r1.179 -r1.181 +retrieving revision 1.182 +diff -B -p -u -r1.179 -r1.182 --- ld/emultempl/elf32.em 6 Jul 2007 14:09:42 -0000 1.179 -+++ ld/emultempl/elf32.em 13 Jul 2007 10:44:26 -0000 1.181 -@@ -41,6 +41,9 @@ ++++ ld/emultempl/elf32.em 18 Jul 2007 09:46:05 -0000 1.182 +@@ -41,6 +41,9 @@ cat >e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <contents == NULL) + { -+ ASSERT (asec->output_offset == 0); -+ i_shdr->contents = xcalloc (i_shdr->sh_size, 1); -+ if (i_shdr->contents == NULL) -+ return FALSE; ++ if (asec->contents == NULL) ++ asec->contents = xmalloc (asec->size); ++ contents = asec->contents; + } -+ contents = i_shdr->contents + asec->output_offset; ++ else ++ contents = i_shdr->contents + asec->output_offset; + + e_note = (void *) contents; + size = offsetof (Elf_External_Note, name[sizeof "GNU"]); @@ -468,16 +468,17 @@ diff -b -u -r1.179 -r1.181 + else + abort (); /* Should have been validated earlier. */ + -+ size = i_shdr->sh_size; -+ return (bfd_seek (abfd, i_shdr->sh_offset, SEEK_SET) == 0 -+ && bfd_bwrite (i_shdr->contents, size, abfd) == size); ++ size = asec->size; ++ return (bfd_seek (abfd, ++ i_shdr->sh_offset + asec->output_offset, SEEK_SET) == 0 ++ && bfd_bwrite (contents, size, abfd) == size); +} + + /* This is called after all the input files have been opened. */ static void -@@ -866,6 +1032,49 @@ +@@ -866,6 +1033,49 @@ gld${EMULATION_NAME}_after_open (void) { struct bfd_link_needed_list *needed, *l; @@ -527,7 +528,7 @@ diff -b -u -r1.179 -r1.181 if (link_info.eh_frame_hdr && ! link_info.traditional_format && ! link_info.relocatable) -@@ -1760,6 +1969,7 @@ +@@ -1760,6 +1970,7 @@ cat >>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c < - 2.17.50.0.17-3 +- fix for ld --build-id + * Sun Jul 15 2007 Roland McGrath - 2.17.50.0.17-2 - ld --build-id support