You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current data segment address determination is as follows.
/* page_size is an unnecessary 0x8000byte elf header */
/* 0x10000 is from here : https://github.com/vitasdk/buildscripts/blob/master/patches/binutils/0001-vita.patch#L9 */
data_seg_addr = ((((text_seg_addr + text_seg_size + (page_size - 1)) & ~(page_size - 1)) + (text_seg_addr & (page_size - 1))) + (page_size - 1) + (0x10000 - 1)) & ~(0x10000 - 1)
And we have a simple example. 0x81010000 = ((((0x81000000 + 0x7FF0 + (0x8000 - 1)) & ~(0x8000 - 1)) + (0x81000000 & (0x8000 - 1))) + (0x8000 - 1) + (0x10000 - 1)) & ~(0x10000 - 1)
This example should determine the address of the data segment as 0x81010000, but the actual text segment exceeds 0x81010000 because text_seg_size does not take into account the size of the information needed for sce_self.
This causes duplication of text and data segments, causing the compiler to throw an error.
The text was updated successfully, but these errors were encountered:
frangarcj
pushed a commit
to vitasdk/buildscripts
that referenced
this issue
Jan 4, 2021
* Create 0003-fix-elf-vaddr.patch
* Fixed temporary elf size for vita.
Related to this issue : vitasdk/vita-toolchain#150
* Add 0003-fix-elf-vaddr.patch for binutils
* Remove comment
The current data segment address determination is as follows.
And we have a simple example.
0x81010000 = ((((0x81000000 + 0x7FF0 + (0x8000 - 1)) & ~(0x8000 - 1)) + (0x81000000 & (0x8000 - 1))) + (0x8000 - 1) + (0x10000 - 1)) & ~(0x10000 - 1)
This example should determine the address of the data segment as 0x81010000, but the actual text segment exceeds 0x81010000 because text_seg_size does not take into account the size of the information needed for sce_self.
This causes duplication of text and data segments, causing the compiler to throw an error.
The text was updated successfully, but these errors were encountered: