Plugin interfaces to do Pettis Hansen style code layout in the gold linker.
Cary Coutant
ccoutant@google.com
Wed Jul 13 21:52:00 GMT 2011
More information about the Binutils mailing list
Wed Jul 13 21:52:00 GMT 2011
- Previous message (by thread): Plugin interfaces to do Pettis Hansen style code layout in the gold linker.
- Next message (by thread): Plugin interfaces to do Pettis Hansen style code layout in the gold linker.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> I made all the changes you mentioned. I removed the
> inspect_unclaimed_object hooks and allowed the functionality to happen
> in claim_file hook, so one handle. Please look at readsyms.cc in
> particular as that has the biggest change to allow this to happen.
@@ -634,7 +696,7 @@ Plugin_manager::get_input_file(unsigned
ld_plugin_status
Plugin_manager::release_input_file(unsigned int handle)
{
- Pluginobj* obj = this->object(handle);
+ Pluginobj* obj = this->object(handle)->pluginobj();
if (obj == NULL)
return LDPS_BAD_HANDLE;
If there is no ELF object, this->object(handle) might return null. You
need to check that before trying to downcast.
+Object*
+Plugin_manager::get_elf_object(const void* handle)
+{
+ Object* obj = parameters->options().plugins()->object(
+ static_cast<unsigned int>(reinterpret_cast<intptr_t>(handle)));
Doesn't "this->object(...)" work here?
@@ -659,7 +738,7 @@ Plugin_manager::get_view(unsigned int ha
else
{
// An already claimed file.
- Pluginobj* obj = this->object(handle);
+ Pluginobj* obj = this->object(handle)->pluginobj();
You need to check for NULL.
@@ -1321,7 +1399,7 @@ get_symbols(const void* handle, int nsym
{
gold_assert(parameters->options().has_plugins());
Pluginobj* obj = parameters->options().plugins()->object(
- static_cast<unsigned int>(reinterpret_cast<intptr_t>(handle)));
+ static_cast<unsigned
int>(reinterpret_cast<intptr_t>(handle)))->pluginobj();
And here.
// Return the Pluginobj associated with the given HANDLE.
- Pluginobj*
+ Object*
object(unsigned int handle) const
Update the comment, please.
-cary
- Previous message (by thread): Plugin interfaces to do Pettis Hansen style code layout in the gold linker.
- Next message (by thread): Plugin interfaces to do Pettis Hansen style code layout in the gold linker.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list