bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/27229] Writing symbols section - example code does not wor


From: karthik.eu at outlook dot com
Subject: [Bug binutils/27229] Writing symbols section - example code does not work
Date: Mon, 25 Jan 2021 17:04:01 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=27229

--- Comment #1 from karthik.eu at outlook dot com ---
I ran llvm-* set of binutils tools and realized I did not set arch_info for my
object file.

> $ llvm-objdump -d out.obj 
> out.obj: file format coff-<unknown arch>
> llvm-objdump: error: 'out.obj': can't find target: : error: unable to get 
> target for 'unknown--', see --version and --triple.



Adding

```
    auto *scanned = bfd_scan_arch("i386:x86-64");
    assert(scanned != nullptr);
    bfd_set_arch_info(abfd, scanned);
```

works.

> $ file out.obj 
> out.obj: Intel amd64 COFF object file, no relocation info, no line number 
> info, not stripped, 1 section, symbol offset=0x3c, 1 symbols

Is there any reason for some arch-machine combinations (like `a.out-sunos-big`
in the example code) I don't need to set this by default?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]