<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/BaseTools/Source/C, branch dependabot/github_actions/github/codeql-action-4.39.3</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Fgithub%2Fcodeql-action-4.39.3</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Fgithub%2Fcodeql-action-4.39.3'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-10-29T16:33:49+00:00</updated>
<entry>
<title>BaseTools/GenFv: handle NetBSD/OpenBSD libuuid include path</title>
<updated>2026-10-29T16:33:49+00:00</updated>
<author>
<name>Leif Lindholm</name>
<email>leif.lindholm@oss.qualcomm.com</email>
</author>
<published>2026-10-16T22:23:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=58206682fe3212b80f662f6a62c375cce85d595e'/>
<id>urn:sha1:58206682fe3212b80f662f6a62c375cce85d595e</id>
<content type='text'>
NetBSD/OpenBSD use same installation path for libuuid header as FreeBSD,
so add || conditions for that.

Signed-off-by: Leif Lindholm &lt;leif.lindholm@oss.qualcomm.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/CommonLib: drop unused "strlwr" function</title>
<updated>2026-10-29T16:33:49+00:00</updated>
<author>
<name>Leif Lindholm</name>
<email>leif.lindholm@oss.qualcomm.com</email>
</author>
<published>2026-10-16T22:18:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=4bfe98b3af83f3d85148082cf33883c37deefde3'/>
<id>urn:sha1:4bfe98b3af83f3d85148082cf33883c37deefde3</id>
<content type='text'>
Compilation of strlwr fails on NetBSD 11/GCC 12.5 build error with
error: array subscript has type 'char' [-Werror=char-subscripts]
due to use of undefined char signedness.

There are however no remaining callers in BaseTools, and I think
the last user may have been deleted in 2008 with 808def96aa45.
So drop the function.

Signed-off-by: Leif Lindholm &lt;leif.lindholm@oss.qualcomm.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/GenFw: Remove unused mPhdrBase variable</title>
<updated>2026-10-27T21:09:48+00:00</updated>
<author>
<name>Nate DeSimone</name>
<email>nathaniel.l.desimone@intel.com</email>
</author>
<published>2026-10-23T22:06:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=f884ecc80e7b601821874b197c0979b8999d7411'/>
<id>urn:sha1:f884ecc80e7b601821874b197c0979b8999d7411</id>
<content type='text'>
Clang 23 detects that mPhdrBase is unused via the
-Wunused-but-set-global warning, which breaks the BaseTools
build.

Signed-off-by: Nate DeSimone &lt;nathaniel.l.desimone@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/GenSec: Use SECTION_SIZE to read section size</title>
<updated>2026-09-03T10:36:41+00:00</updated>
<author>
<name>Mingjie Shen</name>
<email>shen497@purdue.edu</email>
</author>
<published>2026-08-31T22:14:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=52f19aacd569aa0f1f264108ed518a96657f9088'/>
<id>urn:sha1:52f19aacd569aa0f1f264108ed518a96657f9088</id>
<content type='text'>
Replace the open-coded read of the 3-byte section Size[] field with
the SECTION_SIZE() macro from Pi/PiFirmwareFile.h. The macro reads
exactly the three Size[] bytes (endianness-safe) instead of a 4-byte
load that over-reads the adjacent byte. No functional change.

Verified by building BaseTools and running GenSec:

  python3 BaseTools/Edk2ToolsBuild.py -t GCC
  GenSec -s EFI_SECTION_RAW -o out.sec in.bin   # in.bin: 100 bytes

out.sec is 104 bytes: the 100-byte payload plus the 4-byte
EFI_COMMON_SECTION_HEADER. The Size field of the header reads
0x000068, matching out.sec's size that is calculated by SECTION_SIZE.

Generated with the following Coccinelle semantic patch:

```smpl
@@
EFI_COMMON_SECTION_HEADER *E;
typedef UINT32;
@@
(
- *(UINT32 *)(E-&gt;Size) &amp; 0x00FFFFFF
+ SECTION_SIZE (E)
|
- *(UINT32 *)E-&gt;Size &amp; 0x00FFFFFF
+ SECTION_SIZE (E)
)
```

Signed-off-by: Mingjie Shen &lt;shen497@purdue.edu&gt;
</content>
</entry>
<entry>
<title>BaseTools: Add support for preserving build ID</title>
<updated>2026-07-22T18:06:03+00:00</updated>
<author>
<name>Chris Fernald</name>
<email>chfernal@microsoft.com</email>
</author>
<published>2026-01-16T17:30:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=27ac8fac0b61e6b464369cc1cadc66a7b83336c4'/>
<id>urn:sha1:27ac8fac0b61e6b464369cc1cadc66a7b83336c4</id>
<content type='text'>
Adds an optional flag that copies the GNU build-id note from the input
ELF file into the output PE/COFF firmware image as a dedicated ".bldid"
section. The build ID is emitted by the linker as a unique fingerprint
of the binary and allows custom post-build and debugging tools to
reliably match a firmware image against its corresponding unstripped
ELF and debug symbols, without relying on file names, timestamps, or
build paths.

This notable opts to use a non-standard section name ".bldid" to store
the build ID. This approach was chosen to keep genfw and the parsers simple
since the full "build-id" name would require redirecting the section name.
While this breaks from standard conventions, this is not impactful since
GenFW is already creating a non-standard artifact for the PE image with
the associated ELF symbol file.

Signed-off-by: Chris Fernald &lt;chfernal@microsoft.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/GenFv: Preserve legacy rebase behavior when Xip is unused</title>
<updated>2026-07-15T21:37:05+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2026-07-14T20:23:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0347d3b7113ef215e0f19a38206703e86a4e5d1b'/>
<id>urn:sha1:0347d3b7113ef215e0f19a38206703e86a4e5d1b</id>
<content type='text'>
Add XipFileCount to FV_INFO to track how many files have the ,XIP
suffix. Update FfsRebase() to only apply selective XIP rebase when
XipFileCount &gt; 0. When no files have the ,XIP suffix (XipFileCount
== 0), preserve the legacy ForceRebase=TRUE behavior of rebasing all
files. This maintains backward compatibility for existing platforms
that use FvForceRebase=TRUE without any Xip rules.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/GenFv: Parse ,XIP suffix for per-file rebase control</title>
<updated>2026-06-22T15:18:12+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2026-05-06T02:10:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=3ee3b60eb82d52e159641b89d66bcc91a40b84ce'/>
<id>urn:sha1:3ee3b60eb82d52e159641b89d66bcc91a40b84ce</id>
<content type='text'>
Update ParseFvInf() to detect and strip ",XIP" suffix from
EFI_FILE_NAME values in the FV INF file. Store the per-file XIP
flag in the new XipFile[] array in the FV_INFO structure.

Add FileIndex parameter to FfsRebase() so it can look up the XIP
flag for the current file. When ForceRebase is TRUE, only rebase
files that have their XipFile[] entry set to TRUE.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/GenFw: Fix LoongArch ELF-to-PE RVA conversion</title>
<updated>2026-06-22T03:36:43+00:00</updated>
<author>
<name>Dongyan Qian</name>
<email>qiandongyan@loongson.cn</email>
</author>
<published>2026-06-11T11:58:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0225975462ae28b2c3ba0bc18cf13f639ab741d9'/>
<id>urn:sha1:0225975462ae28b2c3ba0bc18cf13f639ab741d9</id>
<content type='text'>
GenFw converts linked ELF images to PE/COFF images using a new section
layout. The generated PE/COFF section RVAs are not required to match the
linked ELF section addresses, so relocation fixups that rewrite section
contents must use the generated PE/COFF RVA space.

A linker script layout change can expose this on LoongArch64 when .text
and .data are linked with 0x1000 alignment while .hii still keeps a
0x4000 alignment. GenFw then keeps a 0x4000 PE/COFF section alignment
because of .hii, producing different ELF and PE/COFF layouts.

Fix two LoongArch relocation paths exposed by this layout mismatch.
R_LARCH_64 entries stored in section contents, such as switch jump
tables, must be translated from the linked ELF section address space to
the generated PE/COFF RVA space. R_LARCH_PCALA_* and R_LARCH_GOT_PC_*
must also convert the referenced symbol to its generated PE/COFF RVA
before calculating the PC-relative offset.

The LoongArch ELF ABI defines PCALA/GOT_PC relocations as page-based,
but this GenFw path rewrites the HI/LO pair to PCADDU12I plus ADDI.D.
After that rewrite, the offset split must be based on the generated
PE/COFF instruction-relative offset.

For example, in the failing LogoDxe image, _gUefiDriverRevision is at
ELF address 0x5400 in .text, and the relocation referencing it is at ELF
address 0x104c. With ELF .text at 0x1000 and PE/COFF .text at 0x4000,
the generated PE/COFF RVAs are 0x8400 for the symbol and 0x404c for the
relocation site. Mixing the ELF symbol address with the PE/COFF
relocation-site RVA makes the entry wrapper read PE/COFF RVA 0x5400
instead of 0x8400, causing EFI_INCOMPATIBLE_VERSION.

Use PE/COFF RVAs consistently when rewriting LoongArch absolute and
PC-relative references during WriteSections64(). The existing
WriteRelocations64() base relocation emission is kept for load-time
image rebasing.

Reported-by: Chao Li &lt;lichao@loongson.cn&gt;
Signed-off-by: Dongyan Qian &lt;qiandongyan@loongson.cn&gt;
Signed-off-by: Chao Li &lt;lichao@loongson.cn&gt;
Tested-by: Dongyan Qian &lt;qiandongyan@loongson.cn&gt;
</content>
</entry>
<entry>
<title>BaseTools: Adjust the LoongArch PC related static relocation</title>
<updated>2026-05-26T13:07:30+00:00</updated>
<author>
<name>Chao Li</name>
<email>lichao@loongson.cn</email>
</author>
<published>2026-05-07T03:26:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1416dcb8df17f6fb74ec2cf2a881ee8664800af8'/>
<id>urn:sha1:1416dcb8df17f6fb74ec2cf2a881ee8664800af8</id>
<content type='text'>
The relocation methods of R_LARCH_PCALA_HI20, R_LARCH_PCALA_LO12,
R_LARCH_GOT_PC_HI20 and R_LARCH_GOT_PC_LO12 have been optimized to
support cases where HI is not adjacent to LO and where one HI
corresponds to multiple LOs.

Signed-off-by: Chao Li &lt;lichao@loongson.cn&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Guillermo Antonio Palomino Sosa &lt;guillermo.a.palomino.sosa@intel.com&gt;
Cc: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Cc: Poncho Figueroa &lt;poncho.figueroa.esqueda@intel.com&gt;
Cc: Mike Beaton &lt;mjsbeaton@gmail.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Add missing machine types while dumping Option Rom</title>
<updated>2026-04-23T05:31:47+00:00</updated>
<author>
<name>Qihang Gao</name>
<email>gaoqihang@loongson.cn</email>
</author>
<published>2026-04-20T06:24:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=5e2bea1a7453dddeaa83840a4b974bb94d3e4f9c'/>
<id>urn:sha1:5e2bea1a7453dddeaa83840a4b974bb94d3e4f9c</id>
<content type='text'>
When dumping LOONGARCH64 or RISCV64 Option Rom by `EfiRom -d test.rom`
command, the machine type is showed as `unknown`. This patch adds type
lookup strings for the two architectures.

Signed-off-by: Qihang Gao &lt;gaoqihang@loongson.cn&gt;
</content>
</entry>
</feed>
