binutils-gdb/include/coff
Jan W. Jagersma 4d095f5b5e coff-go32-exe: support variable-length stubs
The stub size in GO32 executables has historically been fixed at 2048
bytes, due to hardcoded limitations in bfd.  Recent patches to djgpp by
Stas Sergeev (CC'd) have pushed the stub right up to this limit, so if
any further expansion is desired, this must first be patched in bfd.

This series includes three patches:  The first changes the meaning of
the bfd->origin field slightly, so that target code can use this to
specify an offset into the file where the actual bfd is located.
The second patch then uses this to enable support for variable-sized
stubs in the coff-go32-exe format.
The final patch is only a cleanup, it normalizes function and variable
names in coff-stgo32.c so that they all begin with the same prefix.

bfd	* bfdio.c (bfd_bread, bfd_tell, bfd_seek, bfd_mmap): Always add
	bfd->origin to file offset.
	* bfdwin.c (bfd_get_file_window): Likewise.
	* bfd.c: Clarify the use of the bfd->origin field.
	* bfd-in2.h: Regenerate.
	* coff-i386.c: Don't include go32exe.h. Allow overriding
	coff_write_object_contents via COFF_WRITE_CONTENTS.
	* coff-stgo32.c (go32exe_cleanup, go32exe_mkobject)
	(go32exe_write_object_contents): New functions.
	(go32exe_temp_stub, go32exe_temp_stub_size): New static globals.
	(COFF_WRITE_CONTENTS, GO32EXE_DEFAULT_STUB_SIZE): Define.
	(create_go32_stub): Remove check for 2k size limit.  Read stub
	from go32exe_temp_stub if present.
	(go32_stubbed_coff_bfd_copy_private_bfd_data): Allocate and
	copy variable-length stub.
	(go32_check_format): Read stub to go32exe_temp_stub, set
	origin, return go32exe_cleanup.
	(adjust_filehdr_in_post, adjust_filehdr_out_pre)
	(adjust_filehdr_out_post, adjust_scnhdr_in_post)
	(adjust_scnhdr_out_pre, adjust_scnhdr_out_post)
	(adjust_aux_in_post, adjust_aux_out_pre, adjust_aux_out_post):
	Remove functions and their associated #defines.
	* coffcode.h (coff_mkobject_hook): Remove stub copying code.
	* libcoff-in.h: (struct coff_tdata): New field stub_size.
	Rename field go32stub to stub.
	* libcoff.h: Regenerate.
	* coff-stgo32.c (go32_check_format): Rename to...
	(go32exe_check_format): ...this.
	(go32_stubbed_coff_bfd_copy_private_bfd_data): Rename to...
	(go32exe_copy_private_bfd_data): ...this.
	(stub_bytes): Rename to...
	(go32exe_default_stub): ...this.
	(create_go32_stub): Rename to...
	(go32exe_create_stub): ...this.
	* coff-stgo32.c (go32exe_copy_private_bfd_data): Avoid realloc
	when possible.

include	* coff/go32exe.h: Remove file.
	* coff/internal.h (struct internal_filehdr): Remove field
	go32stub.  Remove flag F_GO32STUB.
2020-04-02 14:31:43 +01:00
..
alpha.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
arm.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ChangeLog-0415 binutils ChangeLog rotation 2016-01-01 22:59:17 +10:30
ChangeLog-9103 Add copyright notices 2012-12-10 12:48:03 +00:00
ecoff.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
external.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
i386.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ia64.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
internal.h coff-go32-exe: support variable-length stubs 2020-04-02 14:31:43 +01:00
mcore.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
mips.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
msdos.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
pe.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
powerpc.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
rs6k64.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
rs6000.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
sh.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
sym.h
symconst.h
ti.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
tic4x.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
tic30.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
tic54x.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
x86_64.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
xcoff.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
z8k.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
z80.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30