Bug 15405 - "ld -r" breaking on IA64
Summary: "ld -r" breaking on IA64
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: egcs64
Version: 6.2
Hardware: ia64
OS: Linux
high
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-08-04 16:12 UTC by Rob Gjertsen
Modified: 2017-08-04 15:14 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-08-04 16:12:23 UTC
Embargoed:


Attachments (Terms of Use)

Description Rob Gjertsen 2000-08-04 16:12:22 UTC
I hope this is the right category.

This is a bug I've encounterd when running the linkage editor, ld, provided
by the Red Hat tools group (Cygnus). I am currently running TurboLinux on
IA64, but this should work on either TurboLinux or Redhat. I guess you are
probably
going to tell me that I should be running Red Hat instead.

Environment: Linux IA64 SMP, using TurboLinux 0505 environment with gnu
toolchain from 0714 (this breaks with 0505 gnu toolchain)
Running ld built from src: GNU ld version 2.9-ia64-000216-final (with BFD
2.9-ia64-000216-final)

I've grabbed the source for the Cygnus tools set and recompiled ld/bfd with
debugging so I can see where it is breaking, but not sure why yet. I notice
that if I
remove some "extraneous" header includes then "ld -r" will work; of course
this works
fine for toy stuff. I've included full bug report details below.

--------------------------------------------------------
Environment: Linux IA64 SMP, using Turbolinux 0505 environment with gnu
toolchain from
0714
Running ld built from src: GNU ld version 2.9-ia64-000216-final (with BFD
2.9-ia64-000216-final)

Command: ld -r -o mmfslinux gplInit.ko file.ko

Output:
Program received signal SIGSEGV, Segmentation fault.
0x400000000007f571 in bfd_elf64_bfd_final_link ()
          
Gdb info:
(gdb) backtrace
#0  0x400000000007f571 in bfd_elf64_bfd_final_link ()
#1  0x400000000006a850 in elf64_ia64_final_link ()
#2  0x400000000002efe0 in ldwrite () 
#3  0x40000000000275d0 in main ()
#4  0x2000000000078820 in __libc_start_main () from /lib/libc.so.0
#5  0x4000000000002bd0 in _start ()
#6  0x400000000007f570 in bfd_elf64_bfd_final_link ()

Gdb indicates that this is dying in elf_bfd_final_link in elflink.h, line
4108,
where esdo ends up with a null pointer.

              esdo->rel_count += (esdi->rel_hdr.sh_size
                                  / esdi->rel_hdr.sh_entsize);

Not sure how concerned I should be by the comment in elflink.h, line 4259,
about
relocatable linking.

Temporary fix that actually seems to "work" (in sense that ld doesn't blow
up now):
Put in check to make sure (output_section->used_by_bfd != NULL)

[gjertsen@clue5 bfd]$ diff elflink.h.ORG elflink.h
4107a4108,4110
>               /* add in new check */
>               if (output_section->used_by_bfd)
>               {
4112a4116
>               }

Comment 1 Preston Brown 2001-05-21 15:09:58 UTC
this is fixed in current versions.


Comment 2 openshift-github-bot 2017-08-04 15:14:18 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/7b225eaafb4f8e0ac72afc084584cad1f68b2617
Merge pull request #15580 from jim-minter/issue15405

Automatic merge from submit-queue

create template-service-broker SA during API server startup

fixes #15405 
(builds on #15568)


Note You need to log in before you can comment on or make changes to this bug.