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: PATCH: Fix linker plugin support for gnu linker


On Sun, Jan 9, 2011 at 3:27 AM, Richard Sandiford
<rdsandiford@googlemail.com> wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>>> Please try commit bf235c35e8c2a386b13f034a8d3269b569b47acb
>>> and let me know if it works for you.
>>>
>>
>> Please use commit 5f61c105470197418bfc258ad9487a423e101bff.
>
> That's better, thanks. ?crt0.o and the group files are being added
> to the second link line now. ?However, crt0.o is being added as a
> normal file whereas STARTUP allows a library-style search
> (lang_input_file_is_search_file_enum). ?This means that the
> second pass tries to open crt0.o in the current directory only.
> Things seem to work with the additional patch below.

It was a typo in my fix. Please use commit
df21a2411c444092f66da6255e974b54373f1a89
or

---
diff --git a/ld/ldlang.c b/ld/ldlang.c
index ac3b3a5..86e8ea2 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -6840,7 +6840,8 @@ lang_startup (const char *name)
   first_file->real = TRUE;

   startup_file = name;
-  cmdline_option_prepend (cmdline_is_file_enum, (void *) name);
+  cmdline_option_prepend (cmdline_is_lang_input_statement_enum,
+			  first_file);
 }

 void
---

> Tearing down and recreating the linker hash table also breaks
> some assumptions in the MIPS backend, but those could be dealt
> with separately.

Please send me a patch.  I will put it in lto-mixed branch.

> To be clear, I don't really have an opinion on whether 1-pass
> or 2-pass is better (or more specifically, whether one is better
> than the other for the BFD linker). ?I just think that (a) we need
> to consider this kind of -T usage when making the decision and
> (b) the 2-pass approach does seem to solve the -T problem in a
> fairly natural way.
>

You just expressed your opinion :-).

-- 
H.J.


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