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]

Re: RFC: COMDAT group names become anonymouse local symbols


On Thu, Oct 21, 2010 at 09:41:12AM -0700, Mark Mitchell wrote:
> On 10/20/2010 11:24 PM, Alan Modra wrote:
> 
> >> So, would a patch to make GAS create a local symbol for the group name
> >> be acceptable?  Or would it be rejected on the grounds that it makes
> >> object files bigger?
> > 
> > I won't object.  In fact, a patch to do that should simplify the group
> > support.
> 
> Thank you.
> 
> I tried to change obj-elf.c:elf_frob_file to create the symbol if the
> test for its presence comes back false -- but calling symbol_new trapped
> because the symbol table is already frozen at that point.
> 
> What API should I be using at that point to create the symbol?

You'll have to do it earlier.  Can you do it when the directive was
seen?  Or, will that lead to multiple definition errors if the symbol
is defined later in the file?  If so you'll have to frob before the
symbol table is frozen: obj_adjust_symtab.

-- 
Daniel Jacobowitz
CodeSourcery


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