Page MenuHomeFreeBSD

Add support for rtld-elf on arm64
ClosedPublic

Authored by andrew on Mar 25 2015, 3:12 PM.
Tags
None
Referenced Files
F87821533: D2136.diff
Mon, Jul 8, 6:51 AM
Unknown Object (File)
Jun 3 2024, 5:07 PM
Unknown Object (File)
May 24 2024, 9:20 PM
Unknown Object (File)
May 9 2024, 5:33 AM
Unknown Object (File)
May 9 2024, 5:32 AM
Unknown Object (File)
May 9 2024, 5:32 AM
Unknown Object (File)
Apr 26 2024, 6:25 PM
Unknown Object (File)
Apr 26 2024, 6:23 PM
Subscribers

Details

Summary

This adds the MD parts of rtld for arm64.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

andrew retitled this revision from to Add support for rtld-elf on arm64.
andrew updated this object.
andrew edited the test plan for this revision. (Show Details)
andrew added reviewers: emaste, kib.
libexec/rtld-elf/aarch64/reloc.c
2

How much of this was copied from Rui's work? It looks mostly
new.

202

same alignment question.

206–207

same alignment question.

210

do you need to print out rela->r_info to help diagnose this in the future?

249

Same alignment question as below.

251

Above we handle a number of different types of relation in what looks to be the same list. Yet here we just punt. Do we need to handle the TLSDESC here too or no? If not, a comment about why might be useful.

265

Why not return -1 or some other error indicator to show we need to implement this?

275

why not return -1 or some error indicator that we'll need to implement this?

311

why not return -1 here?

334

Is the alignment of these two relocation types guaranteed to be sufficient we don't have to copy them?

349

So all we do is check to see if this is not in the main program, and ignore it if it is? That seems strange.
However, looking above I see that it is handled specially there, so a pointer to that / comment here
would help.

352

same alignment question.

Missing change?

--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -4351,8 +4351,7 @@ tls_get_addr_common(Elf_Addr **dtvp, int index, size_t offset)
        return (tls_get_addr_slow(dtvp, index, offset));
 }

-#if defined(__arm__) || defined(__aarch64__) || defined(__mips__) || \
-    defined(__powerpc__)
+#if defined(__arm__) || defined(__mips__) || defined(__powerpc__)

 /*
  * Allocate Static TLS using the Variant I method.
andrew edited edge metadata.
  • Defer symbol lookup, & fix a few issues found while adding this.
  • Use reloc_non_plt to relocate rtld
kib edited edge metadata.

It is somewhat pity that ifuncs are left out, but it is probably more important to get the initial port going.

libexec/rtld-elf/aarch64/reloc.c
149

Shouldn't this situation also result in return (-1) ?

295

The break is excessive.

312

Remove the empy line.

This revision is now accepted and ready to land.Mar 31 2015, 12:15 AM
andrew updated this revision to Diff 4537.

Closed by commit rS280903 (authored by @andrew).