gnu-efi ver. bump

This commit is contained in:
Rmys
2024-07-06 12:53:25 +03:00
parent 2acf535003
commit b3fb33e968
3 changed files with 148 additions and 2 deletions
+7 -1
View File
@@ -10,11 +10,17 @@ from pisi.actionsapi import shelltools
from pisi.actionsapi import get
def build():
pisitools.ldflags.remove("-Wl,-z,relro")
pisitools.ldflags.remove("-Wl,-O1")
pisitools.ldflags.remove("-Wl,--hash-style=gnu")
pisitools.ldflags.remove("-Wl,--as-needed")
pisitools.ldflags.remove("-Wl,--sort-common")
shelltools.system("sed -e 's/-Werror//g' -i Make.defaults")
options="lib gnuefi inc"
options="PREFIX='/usr' lib gnuefi inc apps"
autotools.make(options)
def install():
autotools.rawInstall("INSTALLROOT=%s \
PREFIX='/usr'" % get.installDIR())
@@ -0,0 +1,130 @@
diff --git a/Make.defaults b/Make.defaults
index 0068e31..775e287 100755
--- a/Make.defaults
+++ b/Make.defaults
@@ -199,7 +199,7 @@ endif
ARFLAGS := rDv
ASFLAGS += $(ARCH3264)
LDFLAGS += -nostdlib --warn-common --no-undefined --fatal-warnings \
- --build-id=sha1 -z nocombreloc
+ --build-id=sha1 -z nocombreloc -z norelro
ifneq ($(ARCH),arm)
export LIBGCC=$(shell $(CC) $(CFLAGS) $(ARCH3264) -print-libgcc-file-name)
diff --git a/inc/efirtlib.h b/inc/efirtlib.h
index 518859e..68320bc 100644
--- a/inc/efirtlib.h
+++ b/inc/efirtlib.h
@@ -45,6 +45,7 @@ RtZeroMem (
);
VOID
+EFIAPI
RUNTIMEFUNCTION
RtSetMem (
IN VOID *Buffer,
@@ -53,10 +54,11 @@ RtSetMem (
);
VOID
+EFIAPI
RUNTIMEFUNCTION
RtCopyMem (
IN VOID *Dest,
- IN CONST VOID *Src,
+ IN VOID *Src,
IN UINTN len
);
diff --git a/lib/runtime/efirtlib.c b/lib/runtime/efirtlib.c
index 434db91..f7b6fba 100644
--- a/lib/runtime/efirtlib.c
+++ b/lib/runtime/efirtlib.c
@@ -42,6 +42,7 @@ RtZeroMem (
#pragma RUNTIME_CODE(RtSetMem)
#endif
VOID
+EFIAPI
RUNTIMEFUNCTION
RtSetMem (
IN VOID *Buffer,
@@ -61,10 +62,11 @@ RtSetMem (
#pragma RUNTIME_CODE(RtCopyMem)
#endif
VOID
+EFIAPI
RUNTIMEFUNCTION
RtCopyMem (
IN VOID *Dest,
- IN CONST VOID *Src,
+ IN VOID *Src,
IN UINTN len
)
{
diff --git a/lib/runtime/rtstr.c b/lib/runtime/rtstr.c
index 802e7f4..902e075 100644
--- a/lib/runtime/rtstr.c
+++ b/lib/runtime/rtstr.c
@@ -69,10 +69,13 @@ RtStrnCpy (
)
// copy strings
{
+ CHAR16 CopySrc = *Src;
+ CHAR16 *PCopySrc = &CopySrc;
+
UINTN Size = RtStrnLen(Src, Len);
if (Size != Len)
RtSetMem(Dest + Size, (Len - Size) * sizeof(CHAR16), '\0');
- RtCopyMem(Dest, Src, Size * sizeof(CHAR16));
+ RtCopyMem(Dest, PCopySrc, Size * sizeof(CHAR16));
}
#ifndef __GNUC__
@@ -105,10 +108,13 @@ RtStpnCpy (
)
// copy strings
{
+ CHAR16 CopySrc = *Src;
+ CHAR16 *PCopySrc = &CopySrc;
+
UINTN Size = RtStrnLen(Src, Len);
if (Size != Len)
RtSetMem(Dest + Size, (Len - Size) * sizeof(CHAR16), '\0');
- RtCopyMem(Dest, Src, Size * sizeof(CHAR16));
+ RtCopyMem(Dest, PCopySrc, Size * sizeof(CHAR16));
return Dest + Size;
}
@@ -137,10 +143,12 @@ RtStrnCat (
)
{
UINTN DestSize, Size;
+ CHAR16 CopySrc = *Src;
+ CHAR16 *PCopySrc = &CopySrc;
DestSize = RtStrLen(Dest);
Size = RtStrnLen(Src, Len);
- RtCopyMem(Dest + DestSize, Src, Size * sizeof(CHAR16));
+ RtCopyMem(Dest + DestSize, PCopySrc, Size * sizeof(CHAR16));
Dest[DestSize + Size] = '\0';
}
diff --git a/lib/str.c b/lib/str.c
index a2f8750..0752e06 100644
--- a/lib/str.c
+++ b/lib/str.c
@@ -201,11 +201,13 @@ StrDuplicate (
{
CHAR16 *Dest;
UINTN Size;
+ CHAR16 CopySrc = *Src;
+ CHAR16 *PCopySrc = &CopySrc;
Size = StrSize(Src);
Dest = AllocatePool (Size);
if (Dest) {
- CopyMem (Dest, (void *)Src, Size);
+ CopyMem (Dest, PCopySrc, Size);
}
return Dest;
}
+11 -1
View File
@@ -13,7 +13,10 @@
<IsA>Libry</IsA>
<Summary>Develop EFI applications for ARM-64, ARM-32, x86_64, IA-64 (IPF), and IA-32 (x86) platforms using the GNU toolchain and the EFI development environment..</Summary>
<Description>GNU toolchain and the EFI development environment..</Description>
<Archive sha1sum="40c8a4715cf8c409a093c8d2ca9f5d5b24d73058" type="tarbz2">https://sourceforge.net/projects/gnu-efi/files/gnu-efi-3.0.15.tar.bz2</Archive>
<Archive sha1sum="4f12dc4ab3e7940070c87affea17bf8a6209957a" type="tarbz2">https://sourceforge.net/projects/gnu-efi/files/gnu-efi-3.0.18.tar.bz2</Archive>
<Patches>
<Patch level="1">fedora/gnu-efi-backports.patch</Patch>
</Patches>
</Source>
<Package>
@@ -26,6 +29,13 @@
</Package>
<History>
<Update release="9">
<Date>2024-07-01</Date>
<Version>3.0.18</Version>
<Comment>Version bump.</Comment>
<Name>Pisi Linux Community</Name>
<Email>admin@pisilinux.org</Email>
</Update>
<Update release="8">
<Date>2023-03-12</Date>
<Version>3.0.15</Version>