SPARC has a somewhat strange handling of %lo and %hi modifiers. The existing implementation doesn't agree with the behavior observed with GNU as and we've been missing the corresponding logic for .set. With the patch, I get exactly the same relocations as with GNU as and most importantly, no longer .text relocations in NetBSD's libc.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/Sparc/AsmParser/SparcAsmParser.cpp | ||
---|---|---|
470 ↗ | (On Diff #35752) | "set _GLOBAL_OFFSET_TABLE_" should be emitted with a PC22/PC10 reloc to match, too. Can you extract the kind conversion logic to a separate function and just call it? |
1088 ↗ | (On Diff #35752) | "work slightly differently" seems rather understating the extent of the insanity. :) |
test/MC/Sparc/sparc-pic.s | ||
2 ↗ | (On Diff #35752) | The nonpic cases are covered by sparc-relocations.s already I think? Guess it's fine to restate them here tho. |
49 ↗ | (On Diff #35752) | Might be nice to keep both cases since they're supposed to end up the same. |