[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ld is unable to link the Linux kernel for ARM
From: |
Nicolas Pitre |
Subject: |
Re: ld is unable to link the Linux kernel for ARM |
Date: |
Fri, 30 May 2003 10:34:36 -0400 (EDT) |
Yep, problem solved.
Thanks!
On Fri, 30 May 2003, Nick Clifton wrote:
> Hi Nicolas,
>
> > Here you go. The input files are attached.
> >
> > Just try:
> >
> > arm-linux-ld -r -o out.o foo.o bar.o
>
> Right. foo.o is an empty archive and bar.o is an empty object file.
> Hence the linker cannot find a section onto which it can attach the
> interworking stubs. Of course given that the input is empty the
> linker is not going to have to create any stubs, so please try the
> patch below.
>
> Cheers
> Nick
>
> 2003-05-30 Nick Clifton <address@hidden>
>
> * emultempl/armelf.em (arm_elf_before_allocation): Replace ASSERT
> with a test for a NULL bfd_for_interworking.
>
> Index: ld/emultempl/armelf.em
> ===================================================================
> RCS file: /cvs/src/src/ld/emultempl/armelf.em,v
> retrieving revision 1.33
> diff -c -3 -p -r1.33 armelf.em
> *** ld/emultempl/armelf.em 28 Feb 2003 01:32:31 -0000 1.33
> --- ld/emultempl/armelf.em 30 May 2003 08:16:11 -0000
> *************** arm_elf_before_allocation ()
> *** 108,118 ****
> tem->output_has_begun = FALSE;
>
> lang_for_each_statement (arm_elf_set_bfd_for_interworking);
> - ASSERT (bfd_for_interwork != NULL);
> for (tem = link_info.input_bfds; tem != NULL; tem = tem->link_next)
> tem->output_has_begun = FALSE;
>
> ! bfd_elf32_arm_get_bfd_for_interworking (bfd_for_interwork,
> &link_info);
> }
> /* We should be able to set the size of the interworking stub section. */
>
> --- 108,122 ----
> tem->output_has_begun = FALSE;
>
> lang_for_each_statement (arm_elf_set_bfd_for_interworking);
> for (tem = link_info.input_bfds; tem != NULL; tem = tem->link_next)
> tem->output_has_begun = FALSE;
>
> ! /* If bfd_for_interwork is NULL, then there are no loadable sections
> ! with real contents to be linked, so we are not going to have to
> ! create any interworking stubs, so it is OK not to call
> ! bfd_elf32_arm_get_bfd_for_interworking. */
> ! if (bfd_for_interwork != NULL)
> ! bfd_elf32_arm_get_bfd_for_interworking (bfd_for_interwork, &link_info);
> }
> /* We should be able to set the size of the interworking stub section. */
>
>
>
>