[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/5543] Assembler crashes on .set
From: |
vda dot linux at googlemail dot com |
Subject: |
[Bug gas/5543] Assembler crashes on .set |
Date: |
20 Feb 2008 00:00:29 -0000 |
------- Additional Comments From vda dot linux at googlemail dot com
2008-02-20 00:00 -------
bfd/elf.c:
static bfd_boolean
swap_out_syms (bfd *abfd,
struct bfd_strtab_hash **sttp,
int relocatable_p) {
...
/* Writing this would be a hell of a lot easier if
we had some decent documentation on bfd, and
knew what to expect of the library, and what to
demand of applications. For example, it
appears that `objcopy' might not set the
section of a symbol to be a section that is
actually in the output file. */
fprintf(stderr, "vda: sec->name '%s'\n", sec->name);
sec2 = bfd_get_section_by_name (abfd, sec->name);
if (sec2 == NULL)
{
_bfd_error_handler (_("\
Unable to find equivalent output section for symbol '%s' from section '%s'"),
syms[idx]->name ? syms[idx]->name :
"<Local sym>",
sec->name);
bfd_set_error (bfd_error_invalid_operation);
_bfd_stringtab_free (stt);
return FALSE;
}
fprintf(stderr, "vda: sec2->name '%s'\n", sec2->name);
shndx = _bfd_elf_section_from_bfd_section (abfd, sec2);
BFD_ASSERT (shndx != -1);
Both print the same:
vda: sec->name '*GAS `reg' section*'
vda: sec2->name '*GAS `reg' section*'
This section is created here: gas/as.c:
static void perform_an_assembly_pass (int argc, char ** argv) {
...
reg_section = subseg_new ("*GAS `reg' section*", 0);
and is removed in gas/write.c:
void write_object_file (void) {
...
bfd_section_list_remove (stdoutput, reg_section);
write_object_file() is invoked in main() way before xexit() ->
-> bfd_close()
-> BFD_SEND_FMT (abfd, _bfd_write_contents, (abfd)))
-> _bfd_elf_write_object_contents
-> _bfd_elf_compute_section_file_positions
-> swap_out_syms
--
http://sourceware.org/bugzilla/show_bug.cgi?id=5543
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug gas/5543] Assembler crashes on .set,
vda dot linux at googlemail dot com <=