public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [buildrobot] non-PIC references to __ehdr_start (was: gdb and binutils branch master updated. 4199e3b8669d0a36448687850374fdc2ad7240b6)
       [not found] <20140115115331.2790.qmail@sourceware.org>
@ 2014-01-15 13:30 ` Jan-Benedict Glaw
  2014-01-15 15:46   ` H.J. Lu
  0 siblings, 1 reply; 2+ messages in thread
From: Jan-Benedict Glaw @ 2014-01-15 13:30 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils

[-- Attachment #1: Type: text/plain, Size: 2519 bytes --]

On Wed, 2014-01-15 11:53:31 -0000, amodra@sourceware.org <amodra@sourceware.org> wrote:
> commit 4199e3b8669d0a36448687850374fdc2ad7240b6
> Author: Alan Modra <amodra@gmail.com>
> Date:   Wed Jan 15 21:50:55 2014 +1030
> 
>     non-PIC references to __ehdr_start in pie and shared
>     
>     Rather than hacking every backend to not discard dynamic relocations
>     against an undefined hidden __ehdr_start, make it appear to be defined
>     early.

This patch apparently produces fallout on gcc76.fsffrance.org for (at
least)
score-elf: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=91138
nds32be-elf: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=91139
tic6x-uclinux: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=91206
bfin-elf: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=91207
rl78-elf: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=91212
am33_2.0-linux: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=91213
rx-elf: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=91215
vax-linux: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=91235

It's like:

cp /home/jbglaw/repos/binutils_gdb/ld/emultempl/astring.sed stringify.sed
LIB_PATH='' /bin/sh /home/jbglaw/repos/binutils_gdb/ld/genscripts.sh "/home/jbglaw/repos/binutils_gdb/ld" "/home/jbglaw/build/vax-linux/_install_/lib" "/home/jbglaw/build/vax-linux/_install_" "/home/jbglaw/build/vax-linux/_install_" x86_64-unknown-linux-gnu vax-dec-linux-gnu vax-linux "elf32vax" "/usr/local/lib /lib /usr/lib" no no elf32vax "vax-linux"
gcc -DHAVE_CONFIG_H -I. -I/home/jbglaw/repos/binutils_gdb/ld  -I. -I/home/jbglaw/repos/binutils_gdb/ld -I../bfd -I/home/jbglaw/repos/binutils_gdb/ld/../bfd -I/home/jbglaw/repos/binutils_gdb/ld/../include  -g -O2 -DENABLE_PLUGINS -DLOCALEDIR="\"/home/jbglaw/build/vax-linux/_install_/share/locale\""  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT eelf32vax.o -MD -MP -MF .deps/eelf32vax.Tpo -c -o eelf32vax.o eelf32vax.c
cc1: warnings being treated as errors
eelf32vax.c: In function ‘gldelf32vax_before_allocation’:
eelf32vax.c:1050: error: ‘ehdr_start_save.type’ may be used uninitialized in this function
make[3]: *** [eelf32vax.o] Error 1

MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
 Signature of:                      http://perl.plover.com/Questions.html
 the second  :

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [buildrobot] non-PIC references to __ehdr_start (was: gdb and binutils branch master updated. 4199e3b8669d0a36448687850374fdc2ad7240b6)
  2014-01-15 13:30 ` [buildrobot] non-PIC references to __ehdr_start (was: gdb and binutils branch master updated. 4199e3b8669d0a36448687850374fdc2ad7240b6) Jan-Benedict Glaw
@ 2014-01-15 15:46   ` H.J. Lu
  0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2014-01-15 15:46 UTC (permalink / raw)
  To: Jan-Benedict Glaw; +Cc: Alan Modra, Binutils

On Wed, Jan 15, 2014 at 5:30 AM, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> On Wed, 2014-01-15 11:53:31 -0000, amodra@sourceware.org <amodra@sourceware.org> wrote:
>> commit 4199e3b8669d0a36448687850374fdc2ad7240b6
>> Author: Alan Modra <amodra@gmail.com>
>> Date:   Wed Jan 15 21:50:55 2014 +1030
>>
>>     non-PIC references to __ehdr_start in pie and shared
>>
>>     Rather than hacking every backend to not discard dynamic relocations
>>     against an undefined hidden __ehdr_start, make it appear to be defined
>>     early.
>
> This patch apparently produces fallout on gcc76.fsffrance.org for (at
> least)
> score-elf: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=91138
> nds32be-elf: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=91139
> tic6x-uclinux: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=91206
> bfin-elf: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=91207
> rl78-elf: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=91212
> am33_2.0-linux: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=91213
> rx-elf: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=91215
> vax-linux: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=91235
>
> It's like:
>
> cp /home/jbglaw/repos/binutils_gdb/ld/emultempl/astring.sed stringify.sed
> LIB_PATH='' /bin/sh /home/jbglaw/repos/binutils_gdb/ld/genscripts.sh "/home/jbglaw/repos/binutils_gdb/ld" "/home/jbglaw/build/vax-linux/_install_/lib" "/home/jbglaw/build/vax-linux/_install_" "/home/jbglaw/build/vax-linux/_install_" x86_64-unknown-linux-gnu vax-dec-linux-gnu vax-linux "elf32vax" "/usr/local/lib /lib /usr/lib" no no elf32vax "vax-linux"
> gcc -DHAVE_CONFIG_H -I. -I/home/jbglaw/repos/binutils_gdb/ld  -I. -I/home/jbglaw/repos/binutils_gdb/ld -I../bfd -I/home/jbglaw/repos/binutils_gdb/ld/../bfd -I/home/jbglaw/repos/binutils_gdb/ld/../include  -g -O2 -DENABLE_PLUGINS -DLOCALEDIR="\"/home/jbglaw/build/vax-linux/_install_/share/locale\""  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT eelf32vax.o -MD -MP -MF .deps/eelf32vax.Tpo -c -o eelf32vax.o eelf32vax.c
> cc1: warnings being treated as errors
> eelf32vax.c: In function ‘gldelf32vax_before_allocation’:
> eelf32vax.c:1050: error: ‘ehdr_start_save.type’ may be used uninitialized in this function
> make[3]: *** [eelf32vax.o] Error 1
>

I checked in this patch to fix it.

-- 
H.J.
--
commit f9c316c4d75be236bbaa8464ef803ed2d3859d6d
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 15 07:43:19 2014 -0800

    Silence uninitialized warning on ehdr_start_save

    Older GCC, like 4.1/4.2, will issue an uninitialized warning on
    ehdr_start_save.  This patch silences by using

    struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save;

    * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
    Silence uninitialized warning on ehdr_start_save with older
    GCC.

diff --git a/ld/ChangeLog b/ld/ChangeLog
index eaa6b93..91055de 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2014-01-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
+ Silence uninitialized warning on ehdr_start_save with older
+ GCC.
+
 2014-01-15  Alan Modra  <amodra@gmail.com>

  * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Define
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 13f86f0..569c7f7 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1481,7 +1481,7 @@ gld${EMULATION_NAME}_before_allocation (void)
   asection *sinterp;
   bfd *abfd;
   struct elf_link_hash_entry *ehdr_start = NULL;
-  struct bfd_link_hash_entry ehdr_start_save;
+  struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save;

   if (is_elf_hash_table (link_info.hash))
     {

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-15 15:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20140115115331.2790.qmail@sourceware.org>
2014-01-15 13:30 ` [buildrobot] non-PIC references to __ehdr_start (was: gdb and binutils branch master updated. 4199e3b8669d0a36448687850374fdc2ad7240b6) Jan-Benedict Glaw
2014-01-15 15:46   ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).