public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: assemble_external on .class files
@ 1999-05-23 11:45 Mark Klein
  1999-05-23 19:27 ` Jeffrey A Law
  1999-05-31 21:36 ` Mark Klein
  0 siblings, 2 replies; 26+ messages in thread
From: Mark Klein @ 1999-05-23 11:45 UTC (permalink / raw)
  To: law; +Cc: egcs, java-discuss

At 03:19 PM 5/22/99 -0600, Jeffrey A Law wrote:

>I wouldn't worry about the extra .IMPORTs.  In fact, it's a little known
>aspect of SOM that the assembler is responsible for _not_ adding an imported
>symbol to the undefined symbols for a module if that symbol is not actually
>referenced.

To which I responded:

>Thanks ... brute force method it is! Just when I was starting to see the
>_trees_ through the forest. :-)

On further thought ... what will this do to other platforms requiring
assemble_external? While this fix may work for PA-RISC, might it cause
other problems elsewhere?


--
Mark Klein                                 DIS International, Ltd.
http://www.dis.com                         415-892-8400
PGP Public Key Available			

^ permalink raw reply	[flat|nested] 26+ messages in thread
* assemble_external on .class files
@ 1999-05-20 21:06 Mark Klein
  1999-05-22 14:23 ` Jeffrey A Law
  1999-05-31 21:36 ` Mark Klein
  0 siblings, 2 replies; 26+ messages in thread
From: Mark Klein @ 1999-05-20 21:06 UTC (permalink / raw)
  To: egcs; +Cc: java-discuss

I'm having a whale of a time trying to figure out a problem I'm 
experiencing with gcj:

External procedure labels need to be .IMPORTED before they can 
be used on my platform. Some of these are part of a dispatch table 
created from classes such as java::lang::Object. My first attempt at 
resolving this was to place an assemble_external() in layout_class(),
but that results in a lot of clutter with .IMPORT statements for a 
whole bunch of things that really are not referenced. I suppose this 
could be my brute force method, but I would prefer to only do the 
.IMPORT for referenced methods/classes.

Here's HelloWorld's _vt_:

        .IMPORT clone__Q34java4lang6Object,CODE
        .IMPORT hashCode__Q34java4lang6Object,CODE
        .align 4
HelloWorld virtual table
        .word _CL_10HelloWorld
        .word 0
        .word P%java::lang::Object::finalize(void)
        .word P%java::lang::Object::hashCode(void)
        .word P%java::lang::Object::equals(java::lang::Object *)
        .word P%java::lang::Object::toString(void)
        .word P%java::lang::Object::clone(void)

Note that clone() and hashCode() have been imported. But finalize(), 
equals() and tostring() have not. They are referenced in some fashion 
in order to be in the virtual table when the rest of their brethren 
are not. But, clone() and hashCode() must be referenced in some other 
path in order to cause them to be imported.

I can't seem to figure out what that path is in order to make the same 
changes for the other case. I also have not completed by gdb port, so
I am debugging this with the native (non-symbolic) debugger, which is
also probably leading to some of my confusion as I chase pointers in trees.

TIA,

M.
--
Mark Klein                                 DIS International, Ltd.
http://www.dis.com                         415-892-8400
PGP Public Key Available			

^ permalink raw reply	[flat|nested] 26+ messages in thread
[parent not found: <Mark>]

end of thread, other threads:[~1999-05-31 21:36 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-23 11:45 assemble_external on .class files Mark Klein
1999-05-23 19:27 ` Jeffrey A Law
1999-05-31 21:36   ` Jeffrey A Law
1999-05-31 21:36 ` Mark Klein
  -- strict thread matches above, loose matches on Subject: below --
1999-05-20 21:06 Mark Klein
1999-05-22 14:23 ` Jeffrey A Law
1999-05-22 15:28   ` Mark Klein
1999-05-31 21:36     ` Mark Klein
1999-05-25 18:33   ` Mark Klein
1999-05-25 19:41     ` Jeffrey A Law
1999-05-25 21:00       ` Per Bothner
1999-05-25 21:50         ` Jeffrey A Law
1999-05-25 22:19           ` Mark Klein
1999-05-25 22:24             ` Jeffrey A Law
1999-05-31 21:36               ` Jeffrey A Law
1999-05-25 22:49             ` Per Bothner
1999-05-31 14:53               ` Mark Klein
1999-05-31 21:36                 ` Mark Klein
1999-05-31 21:36               ` Per Bothner
1999-05-31 21:36             ` Mark Klein
1999-05-31 21:36           ` Jeffrey A Law
1999-05-31 21:36         ` Per Bothner
1999-05-31 21:36       ` Jeffrey A Law
1999-05-31 21:36     ` Mark Klein
1999-05-31 21:36   ` Jeffrey A Law
1999-05-31 21:36 ` Mark Klein
     [not found] <Mark>
     [not found] ` <Klein's>
     [not found]   ` <message>
     [not found]     ` <of>
     [not found]       ` <"Tue,>
     [not found]         ` <25>
     [not found]           ` <May>
     [not found]             ` <1999>
     [not found]               ` <22:19:07>

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).