From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geoff Keating To: gavin@cygnus.com, Mark Mitchell , binutils@sourceware.cygnus.com Subject: Reloc changes to bfd/elf32-mips.c Date: Mon, 27 Sep 1999 04:24:00 -0000 Message-id: <199909271119.VAA01664@gluttony.geoffk.wattle.id.au> X-SW-Source: 1999-09/msg00172.html This has most impact on C++. I'm not sure exactly who can approve changes to the sourceware binutils; if Gavin or Mark could do this (at least for MIPS), it'd be good to know as the current sequence of patches will not be the last. I'm also not sure who can check stuff in. Anyway, is the patch OK? -- Geoffrey Keating ===File ~/patches/cygnus/tx49-bin-relax.patch=============== md5sum: 5e8722c506533dd1 fa69a2dbb712c6f2 162776 Index: binutils/gas/ChangeLog 0a Mon Sep 20 18:17:41 1999 Geoffrey Keating * config/tc-mips.c (nopic_need_relax): Allow for the .sdata.foo sections generated by -fdata-sections, and for the .gnu.linkonce.s sections generated by C++. . Changed files: binutils/gas/ChangeLog binutils/gas/config/tc-mips.c md5sum: 1badbcc38e94c005 36b310b7eac9fea2 333029 --- /sloth/disk0/co/binutils-mainline/binutils/gas/config/tc-mips.c Wed Aug 4 01:22:38 1999 +++ binutils/gas/config/tc-mips.c Mon Sep 27 20:15:59 1999 @@ -294,8 +294,9 @@ static int g_switch_seen = 0; better. This function can only provide a guess, but it seems to work for - gcc output. If it guesses wrong, the only loss should be in - efficiency; it shouldn't introduce any bugs. + gcc output. It needs to guess right for gcc, otherwise gcc + will put what it thinks is a GP-relative instruction in a branch + delay slot. I don't know if a fix is needed for the SVR4_PIC mode. I've only fixed it for the non-PIC mode. KR 95/04/07 */ @@ -10625,7 +10626,9 @@ nopic_need_relax (sym, before_relaxing) assert (strcmp (segname, ".lit8") != 0 && strcmp (segname, ".lit4") != 0); change = (strcmp (segname, ".sdata") != 0 - && strcmp (segname, ".sbss") != 0); + && strcmp (segname, ".sbss") != 0 + && strncmp (segname, ".sdata.", 7) != 0 + && strncmp (segname, ".gnu.linkonce.s.", 16) != 0); } return change; } ============================================================