This is the mail archive of the binutils@sources.redhat.com 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: Group identifier of a comdat group


On Tue, Jun 04, 2002 at 11:25:20AM -0700, Jessica Han wrote:
>   I tried your patch yesterday and I am able to generate the COMDAT
> sections. I still have a couple of questions:
> 1. group_signature uses the name field of the symtab section to get the
> group signature, but that field is empty.

No, group_signature use the sh_link field of the group section to load
up the symbol table, then uses sh_info to index into the symbol table.
The name field of that particular symbol is read, converted to host
byte order, then used to find the name string in the string table
section.

> Could you tell me which utility
> makes use of setup_group, so I can verify this?

It's called when reading an ELF object file containing at least one
group.  eg. for ld, main -> lang_process -> open_input_bfds ->
load_symbols -> bfd_check_format_matches -> bfd_elf32_object_p ->
bfd_section_from_shdr -> _bfd_elf_make_section_from_shdr ->
setup_group

for objcopy, main -> copy_main -> copy_file ->
bfd_check_format_matches -> bfd_elf32_object_p ->
bfd_section_from_shdr -> _bfd_elf_make_section_from_shdr ->
setup_group

Eep, something for me to fix.  The objcopy example gave me:
BFD: BFD 2.12.90 20020604 assertion fail /src/binutils-current/bfd/elf.c:2423

> 2. for a text section gnu.linkonce.t.foo, gas generates
> rela.gnu.linkeonce.t.foo, gnu.linkonce.ia64unwi.foo,
> gnu.linkonce.ia64unw.foo, etc. Are they supposed to be in the COMDAT group
> as well?

Don't worry about the rela sections;  They'll be discarded if the
section they apply to is discarded.  I'm not sure about the unwind
sections.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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