|
Authored by: greed on Monday, May 14 2012 @ 10:01 PM EDT |
Don't forget about linkers which use symbol ordinals--position in a jump/offset
table--to do "dynamic linking". Heck, one system I can think of
assigns a base load address to DLL files, so that at load-time none of the
entries in the jump table need to be relocated.
(And if you try to load two DLLs with the same base address into a single
process it all goes wrong and you have to find the right magic command in
Cygwin.)
String matching at runtime isn't the only way to do dynamic linking. It's just
the easiest for humans to deal with. (Computers love numbers; strings are a
pain for them. Especially RISC CPUs with fixed instruction widths... nasty
byte-oriented operations are stringesessss....)
[ Reply to This | Parent | # ]
|
|
Authored by: Anonymous on Monday, May 14 2012 @ 10:38 PM EDT |
Apparently, after patches are applied to the Android system, dex and dexopt have
to be re-run on all of the apps.
The reason for that would be, that the symbolic references in the app were
statically resolved against the symbols of the old class library, and now the
class library might have changed.
If the symbolic reference really was resolved dynamically (as Oracle claims)
then running dex and dexopt again would not be necessary! Because they would be
resolved each time the program was run, and always be resolved against the
current version of the class library.
But as I understand it, that's not what happens. They are resolved only once
(statically) when you run the dex translation tool (which happens before your
program is even started).[ Reply to This | Parent | # ]
|
|
|
|
|