Displaying 20 results from an estimated 108 matches for "pt_load".
2019 Jul 23
3
Status of syslinux git master
...t; >
> >I think it might be time to revert commit 458a54133ecd ("Fix all
> >warnings, and better separate code that should not be mixed") which
> >broke master. Then apply at least the outstanding patch "Force the
> >linker to put all sections into a single PT_LOAD segment" [2] from
> >Debian which is required for EFI. And maybe tag the result as
> >syslinux-6.04-pre4.
> >
> >[1] https://www.syslinux.org/archives/2019-February/026335.html
> >[2] https://www.syslinux.org/archives/2018-August/026167.html
> >
> >Seb...
2020 Jul 28
1
[PATCH] mk/efi: add -znoseparate-code to LD_FLAGS for EFI builds
More recent versions of the GNU linker (>= 2.31) create a separate
code "PT_LOAD" segment by default (as of
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=f6aec96dce1ddbd8961a3aa8a2925db2021719bb).
Building syslinux EFI images with this -zseparate-code enabled creates
broken EFI images, since efi/wrapper.c only copies the first PT_LOAD
segment to the EFI.
This p...
2016 Aug 12
2
How LLD should create segments when linkerscript is used ?
I wonder what is correct way to create PT_LOADs when linkerscript is used ?
Currently we create new one for each section that changes access flags. But ld seems to do different thing.
Imagine we have next sections:
.section .AX.1,"ax"
.quad 1
.section .A.1,"a"
.quad 2
.section .AW.1,"aw"
.quad 3
And script:
SECTI...
2020 Nov 15
2
lld error: output file too large <some large number>
...am with lld and the above error is generated.
I narrowed it down to lld/Writer.cpp:getFileAlignment ().
(Well, my local repository is from a while back (version 10) and for me it is lld/Writer.cpp:computeFileOffset ())
Either way, where it is calculating the file offset when two sections share same PT_LOAD, the formula used is off2 = off1 + (VA2 – VA1) but the subtraction is causing a negative number, causing out of bound value…
Should this be abs(VA2 – VA1) ?
Or
Should it be cast to a signed integer so we subtract the difference rather than adding the large value?
Thanks
A.
-------------- next par...
2007 Apr 18
3
[PATCH 1 of 1] x86_64: Put .note.* sections into a PT_NOTE segment in vmlinux
This patch updates x86_64 linker script to pack any .note.* sections
into a PT_NOTE segment in the output file.
To do this, we tell ld that we need a PT_NOTE segment. This requires
us to start explicitly mapping sections to segments, so we also need
to explicitly create PT_LOAD segments for text and data, and map the
sections to them appropriately. Fortunately, each section will
default to its previous section's segment, so it doesn't take many
changes to vmlinux.lds.S.
The corresponding change is already made for i386 in -mm and I'd like
this patch to join...
2020 Nov 16
2
lld error: output file too large <some large number>
...ogle.com> wrote:
NetApp Security WARNING: This is an external email. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Alireza, getFileAlignment was renamed in Oct 2018. It seems that
you may have sectionA and sectionB in one PT_LOAD while sectionB has a
lower address. This is invalid.
Can you provide more information about how you have a sectionB with a
lower address? Note that LLD has an error "unable to move location
counter backward for: ".
On Sun, Nov 15, 2020 at 12:20 AM Moshtaghi, Alireza...
2020 Aug 13
2
Adding sections in a binary
...t;>
>> Joseph
For ELF,
* adding a non-SHF_ALLOC section is simple. A non-SHF_ALLOC section is not part of
the memory image and not used by the program (unless for some rare
introspection use cases)
* adding a SHF_ALLOC section is difficult. You likely need to fix the
containing PT_LOAD segment. llvm-objcopy only does the base p_offset fix.
You need to take care p_vaddr/p_paddr/p_filesz/p_memsz by your self.
+ adding a section smaller than the known lowest address (ET_EXEC with a
non-zero image base) or larger than the known largest address:
The PT_LOAD fixes are...
2017 Feb 17
3
Linking Linux kernel with LLD
>>That boot_params.hdr.code32_start field is probably either invalid (bad reloc or something else causing the bootloader to >>calculate the wrong address) or valid but the thing it thinks it is pointing to wasn't loaded (missing PT_LOAD etc.).
>boot_params.hdr.code32_start field is valid :) It is 0x100000, like expected
>
>Then I suspect that that segment isn't being loaded. Is there a PT_LOAD that covers that address? Is the bootloader loading it?
That issue is gone. Not sure what changed, but looks something was fi...
2017 Feb 09
4
Linking Linux kernel with LLD
...gt; (u32)&boot_params + (ds() << 4));
>```
>
>That boot_params.hdr.code32_start field is probably either invalid (bad reloc or something else causing the bootloader to >calculate the wrong address) or valid but the thing it thinks it is pointing to wasn't loaded (missing PT_LOAD etc.).
boot_params.hdr.code32_start field is valid :) It is 0x100000, like expected (btw thanks for those links on info how kernel boots, they were pretty useful). I checked it is valid using trace:
void go_to_protected_mode(void)
{
if (boot_params.hdr.code32_start == 0x100000)
puts("go_to...
2020 Nov 16
2
lld error: output file too large <some large number>
...This is an external email. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
>
>
>
> Hi Alireza, getFileAlignment was renamed in Oct 2018. It seems that
> you may have sectionA and sectionB in one PT_LOAD while sectionB has a
> lower address. This is invalid.
>
> Can you provide more information about how you have a sectionB with a
> lower address? Note that LLD has an error "unable to move location
> counter backward for: ".
>...
2019 Jul 07
5
Status of syslinux git master
...g (yet) and it lacks activity since March.
I think it might be time to revert commit 458a54133ecd ("Fix all
warnings, and better separate code that should not be mixed") which
broke master. Then apply at least the outstanding patch "Force the
linker to put all sections into a single PT_LOAD segment" [2] from
Debian which is required for EFI. And maybe tag the result as
syslinux-6.04-pre4.
[1] https://www.syslinux.org/archives/2019-February/026335.html
[2] https://www.syslinux.org/archives/2018-August/026167.html
Sebastian
2020 Nov 16
1
lld error: output file too large <some large number>
...attachments unless you recognize the sender and know the content is safe.
> >
> >
> >
> >
> > Hi Alireza, getFileAlignment was renamed in Oct 2018. It seems that
> > you may have sectionA and sectionB in one PT_LOAD while sectionB has a
> > lower address. This is invalid.
> >
> > Can you provide more information about how you have a sectionB with a
> > lower address? Note that LLD has an error "unable to move location
> >...
2019 Aug 05
0
Status of syslinux git master
...t;I think it might be time to revert commit 458a54133ecd ("Fix all
> > >warnings, and better separate code that should not be mixed") which
> > >broke master. Then apply at least the outstanding patch "Force the
> > >linker to put all sections into a single PT_LOAD segment" [2] from
> > >Debian which is required for EFI. And maybe tag the result as
> > >syslinux-6.04-pre4.
> > >
> > >[1] https://www.syslinux.org/archives/2019-February/026335.html
> > >[2] https://www.syslinux.org/archives/2018-August/026167.ht...
2020 Nov 16
0
lld error: output file too large <some large number>
Hi Alireza, getFileAlignment was renamed in Oct 2018. It seems that
you may have sectionA and sectionB in one PT_LOAD while sectionB has a
lower address. This is invalid.
Can you provide more information about how you have a sectionB with a
lower address? Note that LLD has an error "unable to move location
counter backward for: ".
On Sun, Nov 15, 2020 at 12:20 AM Moshtaghi, Alireza via llvm-dev
<llv...
2020 Nov 16
0
lld error: output file too large <some large number>
...etApp Security WARNING: This is an external email. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
>
>
>
> Hi Alireza, getFileAlignment was renamed in Oct 2018. It seems that
> you may have sectionA and sectionB in one PT_LOAD while sectionB has a
> lower address. This is invalid.
>
> Can you provide more information about how you have a sectionB with a
> lower address? Note that LLD has an error "unable to move location
> counter backward for: ".
>
> On Sun, Nov 15, 202...
2017 May 30
2
Missing symbol __executable_start on Android when linking with LLD
When linking a project with lld, the android libc links to
__executable_start
which isn't defined when linking with lld (tried on x86), but is when
linking with gnu ld it seems.
I tried:
.globl __executable_start
__executable_start = __ehdr_start
as a workaround but seems to be ignored.
Anyone know a better workaround?
Thanks,
--
Carlo Kok
RemObjects Software
2018 Aug 03
1
Unable to get syslinux.efi to work, grub2 boots tho
Hi,
On 2018-08-03 00:09, Ady Ady via Syslinux wrote:
> I guess you are in Gentoo.
>
> Even if you are not using Debian, you could:
>
> 1_ Download the syslinux-related binary packages from the Debian
> "experimental" (_not_ to be confused with "unstable") repository
> (currently, "6.04~git20171011.af7e95c3+dfsg1-3") and take:
>
> * from
2020 Aug 13
2
Adding sections in a binary
Hey,
LLVM has logic to parse ELF and PE binaries using
`llvm::object::createBinary`. I tried to search in the codebase to see if
there's a possibility to add/remove sections after parsing a binary and
re-write the binary to another location. Basically, like what llvm-objcopy
does. Can you point me to the right classes to look into, if this is
something that LLVM has?
Many thanks
Joseph
2020 Nov 16
0
lld error: output file too large <some large number>
...l. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
>
>
>
> Hi Alireza, getFileAlignment was renamed in Oct 2018. It seems that
> you may have sectionA and sectionB in one PT_LOAD while sectionB has a
> lower address. This is invalid.
>
> Can you provide more information about how you have a sectionB with a
> lower address? Note that LLD has an error "unable to move location
> counter backward for: &...
2013 Nov 27
0
[PATCH 4/4] efi: PE file size differ from in-memory size
...ty in a .o. Thus ld generates the
zeros that belong to that section in the .o. Then, when merging the section
.bss16 into the .bss of syslinux.so, ld is forced to generate ALL the zeros
that belong to the .bss section. Marking this section as NOLOAD make ld to
ignore its content but still produce a PT_LOAD program header with the right
memory size, as needed for the bss.
efi/i386/syslinux.ld | 4 +-
efi/wrapper.c | 138 +++++++++++++++----------------------------------
efi/x86_64/syslinux.ld | 4 +-
3 files changed, 45 insertions(+), 101 deletions(-)
diff --git a/efi/i386/syslinux.l...