Skip to content

ARC_NONE relocs #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: arc-2021.03
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
This fix improves on ARC_NONE and remove .rela for debug sections.
  • Loading branch information
Cupertino Miranda committed Jan 26, 2021
commit b5273ea68e58f745110350a22b1e295acfe08af2
13 changes: 7 additions & 6 deletions bfd/elf32-arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1791,8 +1791,7 @@ elf_arc_relocate_section (bfd * output_bfd,
&& (!IS_ARC_PCREL_TYPE (r_type)
|| (h != NULL
&& h->dynindx != -1
&& !h->def_regular
&& (!info->symbolic || !h->def_regular))))
&& (!SYMBOL_REFERENCES_LOCAL (info, h)))))
{
Elf_Internal_Rela outrel;
bfd_byte *loc;
Expand Down Expand Up @@ -2049,10 +2048,12 @@ elf_arc_check_relocs (bfd * abfd,
/* FALLTHROUGH */
case R_ARC_PC32:
case R_ARC_32_PCREL:
if ((bfd_link_pic (info))
&& ((r_type != R_ARC_PC32 && r_type != R_ARC_32_PCREL)
|| (h != NULL
&& (!info->symbolic || !h->def_regular))))

if (!bfd_link_pic (info))
break;

if (((r_type != R_ARC_PC32 && r_type != R_ARC_32_PCREL)
|| (!SYMBOL_REFERENCES_LOCAL (info, h))))
{
if (sreloc == NULL)
{
Expand Down