This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Linker for OOP


I found this description in GCC Internals info file.

------------------------------------------------------------------------
   11.7 Constant Expression Types
   ==============================

...

   `(const:M EXP)'
        Represents a constant that is the result of an assembly-time
        arithmetic computation.  The operand, EXP, is an expression that
        contains only constants (`const_int', `symbol_ref' and `label_ref'
        expressions) combined with `plus' and `minus'.  However, not all
        combinations are valid, since the assembler cannot do arbitrary
        arithmetic on relocatable symbols.

        M should be `Pmode'.
------------------------------------------------------------------------

Are there any plan to implement this facility as an extension to
object file format?

I don't know the fact but I suppose why linker was originally
invented was to promise user to recompile only modified .c files, and this principal was broken with object oriented programming.


I think with this facility, simple OO language will be much cleaner
than the current, because the offset of member variables or method
table are resolved in link phase.

Please comment.

---
Mikiya Matsuzaka



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]