home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.vms      DEC's VAX* line of computers & VMS.      264,096 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 263,278 of 264,096   
   Dan Cross to Waldek Hebisch   
   Re: Binutils   
   08 Sep 25 09:50:06   
   
   From: cross@spitfire.i.gajendra.net   
      
   In article <109g1s1$3jb20$1@paganini.bofh.team>,   
   Waldek Hebisch  wrote:   
   >Lawrence D’Oliveiro  wrote:   
   >> On Fri, 5 Sep 2025 21:32:01 -0000 (UTC), Waldek Hebisch wrote:   
   >>   
   >>> All indicates that GNU assembler can not handle simple symbol   
   >>> equality as intended.   
   >>   
   >> I tried creating a source file test.s containing just your two problem   
   >> lines:   
   >>   
   >>     .globl _ZN10__cxxabiv117__array_type_infoD1Ev   
   >>     _ZN10__cxxabiv117__array_type_infoD1Ev = _ZN10__cxxabiv11   
   __array_type_infoD2E   
   >>   
   >> and when I try to assemble it,   
   >>   
   >>     gcc -c test.s   
   >>   
   >> there is no error, and test.o is created OK. Trying objdump on it   
   >>   
   >>     objdump -t test.o   
   >>   
   >> shows it has the correct symbol reference in it, albeit undefined:   
   >>   
   >>     test.o:     file format elf64-x86-64   
   >>   
   >>     SYMBOL TABLE:   
   >>     0000000000000000         *UND*  0000000000000000 _ZN10__c   
   xabiv117__array_type_infoD2E   
   >>   
   >> So no, the issue is not with those two particular lines on their own.   
   >> Something else is involved.   
   >   
   >Yes.  AFAICS main issue is creating alias name for an exported   
   >function.  Internal aliases work fine.  Probably data aliases too.   
      
   I caution against putting it in those terms.  What you are doing   
   in GNU `as` when you use the `a = e` syntax is creating a symbol   
   called "a" from that is set to the evalue of some expression.   
   In this contrived example, that expression is just "e", which I   
   used as a stand-in for any arbitrary expression, but if taken   
   literally, would just be valuated to the value of some other   
   symbol, called "e".  If "e" was not defined already, it is   
   assumed to be an external.   
      
   When you assemble troll's file, an object file is generated; the   
   results from `objdump` above show that there is a single symbol   
   in that object file's symbol table, one you referred to when   
   creating '_ZN10__cxxabiv117__array_type_infoD2E'.  But note that   
   '_ZN10__cxxabiv117__array_type_infoD2E' itself (the symbol that   
   you created when you assigned to it) is not in the symbol table.   
      
   However, the symbol that you created is not in the symbol table,   
   which is the fundamental problem.   
      
   	- Dan C.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca