kolibrios-fun/programs/develop
boppan 18f26e7cf9 [clink] Make it able to read and write more than 64k - 1 COFF relocation
These are changes from two commits from the upstream clink repo (https://github.com/mkostoevr/clink) and one commit from the upstream epep repo (https://github.com/mkostoevr/epep).

clink:

    Commit e63ed12ead17e47d77e848da0e7b9f4dd3ad5127
    Bugfix: Make it able to write more than 64k - 1 COFF relocations
    
    If the relocation count is greater than 0xffff then it can't fit
    in the NumberOfRelocations field of a section header. In order to
    specify greater relocation count IMAGE_SCN_LNK_NRELOC_OVFL flag
    should be added to Characteristics and the actual relocation count
    should be written into VirtualAddress field of the first COFF
    relocation.
    
    Commit 328fc3112a30fcaa808f2cad34028a6507d602a3
    Bugfix: Make it able to read more than 64k - 1 COFF relocations
    
    New EPEP API allows to read more than 64k - 1 relocations. Use it
    when reading relocation count for filling SectionInfo and when
    reading relocations for wriring the output file.

epep:

    Commit 3bed4e348a486c346d0a452c58c1d85e1805c09d
    Feature: Higher-level COFF relocations API
    
    Number of COFF relocations of a section is stored in the 16-bit
    NumberOfRelocations field of a section header. If a COFF object has
    more than 2^16 - 1 relocations, then the value does not fit in the
    field.
    
    To solve this problem, IMAGE_SCN_LNK_NRELOC_OVFL flag of a section
    header has been introduced. If this flag is set for the section,
    then the actual number of relocations is stored in the
    VirtualAddress field of the first relocation.
    
    If the flag is set, then NumberOfRelocations field of the section
    header should be equal to 0xffff, othervice the linker should give
    an error.
    
    So this patch introduces few functions adressing this mechanism.
    
    epep_section_contains_extended_relocations:
    
        Checks whether the section has more than 2^16 - 1 relocations.
        Retrns error if the IMAGE_SCN_LNK_NRELOC_OVFL flag is set, but
        the NumberOfRelocations field is not equal to 0xffff.
    
    epep_get_section_extended_number_of_relocations:
    
        Reads the number of COFF relocations from the VirtualAddress
        field of the first COFF relocation.
    
    epep_get_section_number_of_relocations_x:
    
        Gives the number of meaningful relocations of the section.
    
        If the section has less than 2^16 relocations, then returns the
        value of the NumberOfRelocations field of the section header,
        othervice reads the number of relocations from the first COFF
        relocation, but: since the first relocation in this case is not
        meaningful, gives the actual number of relocations minus one.
        This is used in the function documented below.
    
        Returns 1 in the last argument if the section contains extended
        number of relocations, 0 othervice.
    
    epep_get_section_relocation_by_index_x:
    
        If the section has less than 2^16 relocations, then just reads
        a relocation by the given index. In case if the section has
        extended number of relocations, the first relocation is not
        meaningful, so it is skipped, and the relocation at index + 1
        is read instead.



git-svn-id: svn://kolibrios.org@9927 a494cfbc-eb01-0410-851d-a64ba20cac60
2023-08-06 14:41:09 +00:00
..
asciivju/trunk Remove leftover files (trigger autobuild). 2021-03-31 20:29:11 +00:00
backy Backy: no console window when it is not necessary 2021-02-06 17:17:23 +00:00
binutils Added "libmsgbox" to ktcc. 2020-10-14 00:28:46 +00:00
cedit CEdit: added [shift+mouse wheel] for horizontal scrolling; 2023-05-07 17:19:42 +00:00
clink [clink] Make it able to read and write more than 64k - 1 COFF relocation 2023-08-06 14:41:09 +00:00
cmm c-- : 2022-04-21 20:05:08 +00:00
cObj/trunk switch build system to Tup 2014-09-12 15:15:23 +00:00
entropyview added new program EntropyView + to img autobuild 2021-06-04 12:57:30 +00:00
examples Update example.asm 2021-04-25 21:07:36 +00:00
fasm fasm: Fixed displaying of input fields like it was before r9587 2022-01-07 13:52:43 +00:00
fast_call_test Remove some duplicates: proc32.inc, macros.inc, struct.inc, etc. 2017-12-20 00:51:00 +00:00
fp add link 2021-06-09 04:16:21 +00:00
golang fix prior, delete old files 2021-11-21 21:13:23 +00:00
h2d2b/trunk fix function name 'edit_box' to 'edit_box_draw' 2022-01-03 21:03:06 +00:00
heed/trunk Fixed misuse of "/rd/1" (changed to "/sys") for all other programs 2022-01-07 12:42:44 +00:00
info3ds Fixed misuse of "/rd/1" (changed to "/sys") for all other programs 2022-01-07 12:42:44 +00:00
keyascii/trunk flappybird: use Kolibri image 2021-07-09 15:07:50 +00:00
kol_f_edit Fixed misuse of "/rd/1" (changed to "/sys") for all other programs 2022-01-07 12:42:44 +00:00
koldbg Fixed misuse of "/rd/1" (changed to "/sys") for all other programs 2022-01-07 12:42:44 +00:00
kosjs Fix libmujs autobuild 2020-12-27 16:01:26 +00:00
ktcc/trunk libc.obj: 2022-08-02 13:30:05 +00:00
libraries Updated dll.load. Added support for loading the library using the full path. 2023-03-28 16:39:08 +00:00
mstate switch build system to Tup 2014-09-12 15:15:23 +00:00
mtdbg Fixed misuse of "/rd/1" (changed to "/sys") for all other programs 2022-01-07 12:42:44 +00:00
oberon07 oberon07: bugfix 2023-01-22 12:08:46 +00:00
obj2def [obj2def] Initial commit 2021-12-30 23:01:05 +00:00
objconv Added objconv port. 2022-02-06 11:09:00 +00:00
open watcom/trunk Remove some duplicates: proc32.inc, macros.inc, struct.inc, etc. 2017-12-20 00:51:00 +00:00
scancode/trunk switch build system to Tup 2014-09-12 15:15:23 +00:00
scc Fixed misuse of "/rd/1" (changed to "/sys") for all other programs 2022-01-07 12:42:44 +00:00
sdk/trunk Fixed misuse of "/rd/1" (changed to "/sys") for all other programs 2022-01-07 12:42:44 +00:00
SPEDump upload Stripped PE Dumper by 0CodErr, see http://board.kolibrios.org/viewtopic.php?f=9&t=3742&p=71045&hilit=SPEDump#p71045 2021-07-06 08:23:46 +00:00
SPForth Fixed misuse of "/rd/1" (changed to "/sys") for all other programs 2022-01-07 12:42:44 +00:00
str_double/trunk fix function name 'edit_box' to 'edit_box_draw' 2022-01-03 21:03:06 +00:00
tinybasic Old TinyBasic: disabled autobuild 2022-01-18 17:41:03 +00:00
tinybasic-1.0.4 TinyBasic 1.0.4 : uses auto import(KX). 2022-01-18 17:24:09 +00:00
tinypad/trunk Fixed misuse of "/rd/1" (changed to "/sys") for all other programs 2022-01-07 12:42:44 +00:00
tinypy Added new functions in ksys module 2021-02-05 09:05:46 +00:00