This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: binutils 2.19.92 linker broke with --as-needed flag


Alan,

Thanks for quick response.
I don't know how to run the testsuit. I have MIPS platforms. I'd like
to know if you can kindly point me to an  instruction on how to run
the testsuit. So I can setup test quickly.

And I wonder if setting the __GLOBAL_OFFSET_TABLE___ as Local is
another soluation. As the following:

if (! (_bfd_generic_link_add_one_
symbol
         (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_LOCAL, s,
          0, NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh)))
    return FALSE;

Thanks,

Vincent



On Wed, Mar 27, 2013 at 5:02 PM, Alan Modra <amodra@gmail.com> wrote:
> On Wed, Mar 27, 2013 at 10:24:51AM -0700, Vincent Wen wrote:
>> Alan,
>>
>> I'd like to know whether the patch for this issue is accepted or not?
>
> That really is up to one of the MIPS maintainers.  As I said in
> http://sourceware.org/ml/binutils/2013-02/msg00159.html the MIPS backend
> wants _GLOBAL_OFFSET_TABLE_ dynamic for some reason.
>
>   bh = NULL;
>   if (! (_bfd_generic_link_add_one_symbol
>          (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
>           0, NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh)))
>     return FALSE;
>
>   h = (struct elf_link_hash_entry *) bh;
>   h->non_elf = 0;
>   h->def_regular = 1;
>   h->type = STT_OBJECT;
>   elf_hash_table (info)->hgot = h;
>
>   if (info->shared
>       && ! bfd_elf_link_record_dynamic_symbol (info, h))
>     return FALSE;
>
> I think that is just plain wrong, but I don't know the history of this
> code.
>
> Another issue is that your simple one-line patch potentially requires
> testsuite changes.  Have you run the ld testsuite on a native MIPS
> target after making your change?  How about the glibc testsuite?
>
>> I tried to replace STV_HIDDEN with STV_PROTECTED and it doesn't work with
>> our application. Our customer is waiting for the fix and we need to make
>> the release next week.
>
> --
> Alan Modra
> Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]