<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/tools/llvm-objdump/ELFDump.cpp, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[llvm-objdump] Delete unused variables after #128434</title>
<updated>2025-03-19T06:48:55+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-03-19T06:48:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b5ef33b3b9771c169760bcfa3a72c37b794a4a4c'/>
<id>b5ef33b3b9771c169760bcfa3a72c37b794a4a4c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm-objdump][ELF]Fix crash when reading strings from .dynstr (#125679)</title>
<updated>2025-03-10T02:39:58+00:00</updated>
<author>
<name>Ruoyu Qiu</name>
<email>cabbaken@outlook.com</email>
</author>
<published>2025-03-10T02:39:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=82f2b661101d1133b72872141009035f01a42595'/>
<id>82f2b661101d1133b72872141009035f01a42595</id>
<content type='text'>
This change introduces a check for the strtab offset to prevent
llvm-objdump from crashing when processing malformed ELF files.
It provide a minimal reproduce test for
https://github.com/llvm/llvm-project/issues/86612#issuecomment-2035694455.
Additionally, it modifies how llvm-objdump handles and outputs malformed
ELF files with invalid string offsets.(More info:
https://discourse.llvm.org/t/should-llvm-objdump-objdump-display-actual-corrupted-values-in-malformed-elf-files/84391)

Fixes: #86612

Co-authored-by: James Henderson &lt;James.Henderson@sony.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change introduces a check for the strtab offset to prevent
llvm-objdump from crashing when processing malformed ELF files.
It provide a minimal reproduce test for
https://github.com/llvm/llvm-project/issues/86612#issuecomment-2035694455.
Additionally, it modifies how llvm-objdump handles and outputs malformed
ELF files with invalid string offsets.(More info:
https://discourse.llvm.org/t/should-llvm-objdump-objdump-display-actual-corrupted-values-in-malformed-elf-files/84391)

Fixes: #86612

Co-authored-by: James Henderson &lt;James.Henderson@sony.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm-objdump] Rework .gnu.version_d dumping</title>
<updated>2025-02-28T17:38:48+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-02-28T17:38:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7c26356703f02eb72ab6a39d89cb507dceef5164'/>
<id>7c26356703f02eb72ab6a39d89cb507dceef5164</id>
<content type='text'>
and fix crash when vd_aux is invalid (#86611).

vd_version, vd_flags, vd_ndx, and vd_cnt in Elf{32,64}_Verdef are
16-bit. Change VerDef to use uint16_t instead.

vda_name specifies a NUL-terminated string. Update getVersionDefinitions
to remove some `.c_str()`.

Pull Request: https://github.com/llvm/llvm-project/pull/128434
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and fix crash when vd_aux is invalid (#86611).

vd_version, vd_flags, vd_ndx, and vd_cnt in Elf{32,64}_Verdef are
16-bit. Change VerDef to use uint16_t instead.

vda_name specifies a NUL-terminated string. Update getVersionDefinitions
to remove some `.c_str()`.

Pull Request: https://github.com/llvm/llvm-project/pull/128434
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm-objdump]Correct .dynstr finding of getDynamicStrTab() (#127975)</title>
<updated>2025-02-24T10:39:40+00:00</updated>
<author>
<name>Ruoyu Qiu</name>
<email>cabbaken@outlook.com</email>
</author>
<published>2025-02-24T10:39:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5a2bee04d08868d1b8c2ddb1719be1cee0f577bf'/>
<id>5a2bee04d08868d1b8c2ddb1719be1cee0f577bf</id>
<content type='text'>
The dynamic string table used by the dynamic section is referenced by
the sh_link field of that section, so we should use that directly,
rather than going via the dynamic symbol table.
More info:
https://github.com/llvm/llvm-project/pull/125679#discussion_r1961333454

Signed-off-by: Ruoyu Qiu &lt;cabbaken@outlook.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The dynamic string table used by the dynamic section is referenced by
the sh_link field of that section, so we should use that directly,
rather than going via the dynamic symbol table.
More info:
https://github.com/llvm/llvm-project/pull/125679#discussion_r1961333454

Signed-off-by: Ruoyu Qiu &lt;cabbaken@outlook.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm-objdump] Remove leading whitespace for PT_GNU_PROPERTY. (#121591)</title>
<updated>2025-01-13T14:15:24+00:00</updated>
<author>
<name>Ryan Mansfield</name>
<email>ryan_mansfield@apple.com</email>
</author>
<published>2025-01-13T14:15:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=65566281edac2b5f75a99302e7200c957db90143'/>
<id>65566281edac2b5f75a99302e7200c957db90143</id>
<content type='text'>
This fixes the misaligned display of addresses for this p_type.

Previous:

```
   STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**64
         filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-
   PROPERTY off    0x0000000000000358 vaddr 0x0000000000000358 paddr 0x0000000000000358 align 2**3
         filesz 0x0000000000000020 memsz 0x0000000000000020 flags r--
    NOTE off    0x0000000000000334 vaddr 0x0000000000000334 paddr 0x0000000000000334 align 2**2
         filesz 0x0000000000000020 memsz 0x0000000000000020 flags r--
```

After:


```
   STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**64
         filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-
PROPERTY off    0x0000000000000358 vaddr 0x0000000000000358 paddr 0x0000000000000358 align 2**3
         filesz 0x0000000000000020 memsz 0x0000000000000020 flags r--
    NOTE off    0x0000000000000334 vaddr 0x0000000000000334 paddr 0x0000000000000334 align 2**2
         filesz 0x0000000000000020 memsz 0x0000000000000020 flags r--
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes the misaligned display of addresses for this p_type.

Previous:

```
   STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**64
         filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-
   PROPERTY off    0x0000000000000358 vaddr 0x0000000000000358 paddr 0x0000000000000358 align 2**3
         filesz 0x0000000000000020 memsz 0x0000000000000020 flags r--
    NOTE off    0x0000000000000334 vaddr 0x0000000000000334 paddr 0x0000000000000334 align 2**2
         filesz 0x0000000000000020 memsz 0x0000000000000020 flags r--
```

After:


```
   STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**64
         filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-
PROPERTY off    0x0000000000000358 vaddr 0x0000000000000358 paddr 0x0000000000000358 align 2**3
         filesz 0x0000000000000020 memsz 0x0000000000000020 flags r--
    NOTE off    0x0000000000000334 vaddr 0x0000000000000334 paddr 0x0000000000000334 align 2**2
         filesz 0x0000000000000020 memsz 0x0000000000000020 flags r--
```</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm-objdump] Remove some unneeded headers. (#120541)</title>
<updated>2024-12-23T10:16:06+00:00</updated>
<author>
<name>Cabbaken</name>
<email>cabbaken@outlook.com</email>
</author>
<published>2024-12-23T10:16:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=630b7f36731d9ddfdd1f1e17b7862dded902f02f'/>
<id>630b7f36731d9ddfdd1f1e17b7862dded902f02f</id>
<content type='text'>
Co-authored-by: qiuruoyu &lt;qiuruoyu@xiaomi.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: qiuruoyu &lt;qiuruoyu@xiaomi.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm-objdump] -r: support CREL</title>
<updated>2024-07-08T16:14:34+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2024-07-08T16:14:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2f37a22f10a1128c695bc469871a9101edce853e'/>
<id>2f37a22f10a1128c695bc469871a9101edce853e</id>
<content type='text'>
Extract the llvm-readelf decoder to `decodeCrel` (#91280) and reuse it
for llvm-objdump.

Because the section representation of LLVMObject (`SectionRef`) is
64-bit, insufficient to hold all decoder states, `section_rel_begin` is
modified to decode CREL eagerly and hold the decoded relocations inside
ELFObjectFile&lt;ELFT&gt;.

The test is adapted from llvm/test/tools/llvm-readobj/ELF/crel.test.

Pull Request: https://github.com/llvm/llvm-project/pull/97382
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Extract the llvm-readelf decoder to `decodeCrel` (#91280) and reuse it
for llvm-objdump.

Because the section representation of LLVMObject (`SectionRef`) is
64-bit, insufficient to hold all decoder states, `section_rel_begin` is
modified to decode CREL eagerly and hold the decoded relocations inside
ELFObjectFile&lt;ELFT&gt;.

The test is adapted from llvm/test/tools/llvm-readobj/ELF/crel.test.

Pull Request: https://github.com/llvm/llvm-project/pull/97382
</pre>
</div>
</content>
</entry>
<entry>
<title>llvm-objdump/ELF: fix crash when reading dyn str table (#87519)</title>
<updated>2024-04-06T11:22:24+00:00</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>ram.ramachandra@arm.com</email>
</author>
<published>2024-04-06T11:22:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0e8b61f8e0bd37e99f3de06e4e8885844f904eba'/>
<id>0e8b61f8e0bd37e99f3de06e4e8885844f904eba</id>
<content type='text'>
When reading the dynamic string table, llvm-objdump used to crash if the
ELF was malformed, due to an erroneous consumption of error status.
Instead, propogate the error status to the caller, fixing the crash, and
printing a warning.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When reading the dynamic string table, llvm-objdump used to crash if the
ELF was malformed, due to an erroneous consumption of error status.
Instead, propogate the error status to the caller, fixing the crash, and
printing a warning.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm-objdump] Add support for the PT_OPENBSD_SYSCALLS segment type. (#82121)</title>
<updated>2024-02-20T08:11:54+00:00</updated>
<author>
<name>Frederic Cambus</name>
<email>fred@statdns.com</email>
</author>
<published>2024-02-20T08:11:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1b894864862d8049e4a2567a472efdc2eda1e035'/>
<id>1b894864862d8049e4a2567a472efdc2eda1e035</id>
<content type='text'>
Reference: https://github.com/openbsd/src/blob/master/sys/sys/exec_elf.h</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reference: https://github.com/openbsd/src/blob/master/sys/sys/exec_elf.h</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm-objdump] Fix lma display issue for non-bss sections (#72141)</title>
<updated>2023-11-27T17:24:39+00:00</updated>
<author>
<name>Jason Liu</name>
<email>47833311+jasonliudev@users.noreply.github.com</email>
</author>
<published>2023-11-27T17:24:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=623cd75105398dfe199b9588d58281956b8e6753'/>
<id>623cd75105398dfe199b9588d58281956b8e6753</id>
<content type='text'>
llvm-readobj and llvm-objdump have inconsistent handling of display
lma for sections.
This patch tries to common code up and adapt the same approach for
both tools.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-readobj and llvm-objdump have inconsistent handling of display
lma for sections.
This patch tries to common code up and adapt the same approach for
both tools.</pre>
</div>
</content>
</entry>
</feed>
