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] | |
Dear Jim, On Fri, Sep 20, 2019 at 6:23 AM Jim Wilson <jimw@sifive.com> wrote: > Now that I had a little more time to look at this, it turns out that the RISC-V port doesn't support the -z [no]dynamic-undefined-weak option. This is an optional feature, and only the x86 and ppc ports provide it. I hacked support for it in, and then noticed that we don't relax pcrel relocs when creating shared libraries and pie output. Also, the auipc sequence used in pic code results in a local symbol for the addi, and you are only setting undefined_weak for global symbols. So the problem I was worried about can't happen, even if we did have support for -z [no]dynamic-undefined-weak. So you can forget about the UNDEF_NO_DYNAMIC_RELOC comment, it isn't relevant to your patch. Thank you for taking the time to help :) Maybe we will support the auipc relaxation when creating the shared libraries and pie output in the future, so I have added the comment to record the above issue in the attached patch. This patch remove the most redundant `undefined_weak` checking, and the uninitialized function problem is also resolved when building on Ubuntu 18.04. Best Regards Nelson
Attachment:
0001-RISC-V-Optimize-lui-and-auipc-relaxations-for-undefw.patch
Description: Binary data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |