Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

djgpp patches #3

Closed
wants to merge 2 commits into from
Closed

djgpp patches #3

wants to merge 2 commits into from

Conversation

@jwt27
Copy link
Owner

@jwt27 jwt27 commented Mar 20, 2020

No description provided.

@jwt27
Copy link
Owner Author

@jwt27 jwt27 commented Mar 20, 2020

@skitt I am staging and separating out the djgpp patches to binutils here so they can be submitted upstream. In the process I'm making some changes so that less target-independent code is touched.

Now I also ran into the problem you found, where bfd->sections ends up being a null pointer. I went through the patches in your Debian package but couldn't find what you changed. Did you end up fixing this, and if so, would you mind sharing the solution?

@jwt27 jwt27 force-pushed the djgpp branch from 725c5ed to 5786036 Mar 20, 2020
@jwt27
Copy link
Owner Author

@jwt27 jwt27 commented Mar 20, 2020

Disregard that message, I found it. Fixed now.

@skitt
Copy link

@skitt skitt commented Mar 21, 2020

@jwt27 cool, thanks for looking into this. I hadn’t separated the fixes out because I was just hiding the problem, not really handling it...

@jwt27 jwt27 force-pushed the djgpp branch from 5786036 to 69c8b23 Mar 21, 2020
@jwt27
Copy link
Owner Author

@jwt27 jwt27 commented Mar 21, 2020

I haven't really studied how this works either so I fixed it the same way as you did. I don't see under what circumstances you could have a bfd with no sections, so it was probably never an issue in real-world scenarios, only in some artificial test cases.

@jwt27 jwt27 force-pushed the djgpp branch 5 times, most recently from 897ceac to d27a7ce Mar 21, 2020
@jwt27 jwt27 force-pushed the go32stub2 branch from 8e18f83 to 1b577e4 Mar 25, 2020
@jwt27 jwt27 force-pushed the djgpp branch from d27a7ce to c5c38e5 Mar 25, 2020
jwt27 added 2 commits Mar 18, 2020
ld/
2020-03-30  Juan Manuel Guerrero  <juan.guerrero@gmx.de>
            Jan W. Jagersma  <jwjagersma@gmail.com>

	* scripttempl/i386go32.sc: Provide symbol _environ.  Link in
	.ctors and .dtors.  Discard LTO sections.
bfd/
2020-03-30  Juan Manuel Guerrero  <juan.guerrero@gmx.de>
            Jan W. Jagersma  <jwjagersma@gmail.com>

	* coff-go32.c (COFF_GO32, IMAGE_SCN_LNK_NRELOC_OVFL)
	(coff_swap_scnhdr_in, coff_swap_scnhdr_out): Define.
	(_bfd_go32_swap_scnhdr_in, _bfd_go32_swap_scnhdr_out)
	(_bfd_go32_mkobject): New functions.
	* coff-stgo32.c (IMAGE_SCN_LNK_NRELOC_OVFL)
	(coff_swap_scnhdr_in, coff_swap_scnhdr_out): Define.
	(go32exe_mkobject): Call _bfd_go32_mkobject.
	* coffcode.h (COFF_WITH_EXTENDED_RELOC_COUNTER): Define.
	(coff_set_alignment_hook): Define function for COFF_GO32_EXE
	and COFF_GO32.
	(coff_write_relocs): Enable extended reloc counter code if
	COFF_WITH_EXTENDED_RELOC_COUNTER is defined.  Test for obj_go32
	(coff_write_object_contents): Likewise.  Pad section headers
	for COFF_GO32 and COFF_GO32EXE.
	cofflink.c (_bfd_coff_final_link): Test for obj_go32.
	coffswap.h: (coff_swap_scnhdr_in, coff_swap_scnhdr_in): Allow
	overriding these functions with macros of the same name.
	libcoff-in.h: (struct coff_tdata): New field go32.
	(obj_go32): Define.
@jwt27 jwt27 force-pushed the djgpp branch from c5c38e5 to 2599c40 Apr 2, 2020
@jwt27 jwt27 changed the base branch from go32stub2 to master Apr 2, 2020
@jwt27
Copy link
Owner Author

@jwt27 jwt27 commented Apr 17, 2020

This has been applied upstream now (commits 0fe0f2d and f717994) :)

@jwt27 jwt27 closed this Apr 17, 2020
@stsp
Copy link

@stsp stsp commented Apr 17, 2020

Cool!
And I suppose in PPA we have them too?
Maybe you can then increase the "no envseg"
message to test the larger stub right away. :)

@skitt
Copy link

@skitt skitt commented Apr 17, 2020

Very nice, thanks for taking care of this!

@stsp
Copy link

@stsp stsp commented Apr 17, 2020

Ah, wrong thread, this is not about
the larger stubs. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants