Page MenuHomeFreeBSD

Add support for rtld-elf on arm64
ClosedPublic

Authored by andrew on Mar 25 2015, 3:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 2:13 PM
Unknown Object (File)
Tue, Nov 19, 2:13 PM
Unknown Object (File)
Tue, Nov 19, 2:13 PM
Unknown Object (File)
Tue, Nov 19, 2:13 PM
Unknown Object (File)
Tue, Nov 19, 1:49 PM
Unknown Object (File)
Mon, Nov 18, 12:29 PM
Unknown Object (File)
Mon, Nov 4, 11:54 PM
Unknown Object (File)
Mon, Nov 4, 11:30 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
3

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

203

same alignment question.

207–208

same alignment question.

211

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

250

Same alignment question as below.

252

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.

266

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

276

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

312

why not return -1 here?

335

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

350

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.

353

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
148

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

294

The break is excessive.

311

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).