Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

ObjWriter emits R_X86_64_32 relocs rather than R_X86_64_PC32 #538

Closed
jkotas opened this issue Dec 16, 2015 · 4 comments
Closed

ObjWriter emits R_X86_64_32 relocs rather than R_X86_64_PC32 #538

jkotas opened this issue Dec 16, 2015 · 4 comments
Labels
Milestone

Comments

@jkotas
Copy link
Member

jkotas commented Dec 16, 2015

GetSymbolRefExpr always encodes the MCSymbolRefExpr as a VK_None, it needs to be VK_PLT for the IsPCRelative case

@jkotas jkotas added this to the December milestone Dec 16, 2015
@jkotas jkotas added the CodeGen label Dec 16, 2015
@jkotas jkotas modified the milestones: January, December Jan 9, 2016
@kyulee1
Copy link
Contributor

kyulee1 commented Feb 2, 2016

Per discussion before, I don't this is a real issue.

@kyulee1 kyulee1 closed this as completed Feb 2, 2016
@kangaroo
Copy link
Contributor

kangaroo commented Feb 2, 2016

This is still valid (sorry I haven't had time to reply in more detail). VK_None is causing R_X86_64_32 relocs in the text section, not PC32's.

@jkotas jkotas reopened this Feb 2, 2016
@kyulee1
Copy link
Contributor

kyulee1 commented Feb 2, 2016

I'm not sure the case.
When we set IsPCRel = true with VK_None, we get ELF::R_X86_64_PC32 not ELF::R_X86_64_32.
https://github.com/Microsoft/llvm/blob/master/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp#L93-L98

When I "objdump -r hello.obj", I'm seeing either "R_X86_64_64" or " R_X86_64_PC32" only.
Can you provide a specific case/repro for this?

@kyulee1 kyulee1 removed their assignment Sep 16, 2016
@jkotas
Copy link
Member Author

jkotas commented Oct 18, 2016

Need more details if it is still a problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants