Skip to content

convert mscoffobj.c to D#8876

Merged
WalterBright merged 1 commit intodlang:masterfrom
WalterBright:mscoffobj.d
Nov 2, 2018
Merged

convert mscoffobj.c to D#8876
WalterBright merged 1 commit intodlang:masterfrom
WalterBright:mscoffobj.d

Conversation

@WalterBright
Copy link
Member

No description provided.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "master + dmd#8876"

@WalterBright WalterBright force-pushed the mscoffobj.d branch 4 times, most recently from 4389229 to 3126c9c Compare October 27, 2018 08:00
@WalterBright WalterBright added Severity:Refactoring No semantic changes to code D Conversion labels Oct 27, 2018
@WalterBright WalterBright added the Review:WIP Work In Progress - not ready for review or pulling label Oct 27, 2018
@WalterBright WalterBright force-pushed the mscoffobj.d branch 2 times, most recently from b4e24e2 to 6061c5f Compare October 27, 2018 09:45
@12345swordy
Copy link
Contributor

Auto Tester have failed for the Win_32_64 platform. "object.Error@(0): Access Violation".

@WalterBright WalterBright force-pushed the mscoffobj.d branch 16 times, most recently from 451371b to 4c41986 Compare October 28, 2018 05:33
@WalterBright WalterBright force-pushed the mscoffobj.d branch 2 times, most recently from fcf54e7 to ce9f335 Compare October 28, 2018 07:06
@WalterBright WalterBright removed the Review:WIP Work In Progress - not ready for review or pulling label Oct 28, 2018
* Input:
* seg = segment index that symbol is defined in
* s -> symbol
* s . symbol
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess DAutoTest doesn't like this one.

* Output a common block definition.
* Input:
* p -> external identifier
* p . external identifier
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this.

* seg = where the address is going (CODE or DATA)
* offset = offset within seg
* s -> Symbol table entry for identifier
* s . Symbol table entry for identifier
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this

@WalterBright
Copy link
Member Author

@rainers thanks for finding the problem. I don't know how you found it in the log, all I could find was:

The dependency resolution process is taking too long. The dependency graph is likely hitting a pathological case in the resolution algorithm. Please file a bug report at https://github.com/dlang/dub/issues and mention the package recipe that reproduces this error.
posix.mak:766: recipe for target 'dpl-docs' failed

so I assumed it was some environmental problem.

@rainers
Copy link
Member

rainers commented Oct 28, 2018

@rainers thanks for finding the problem. I don't know how you found it in the log

I just noticed during review, I think there will be more (IIRC some parameter names in the doc didn't match the function signature, but couldn't find them now). DAutoTest seems to fail for other reasons on all PRs, see e.g. #8878 (comment)

src/win32.mak Outdated

$G/mscoffobj.obj : $C\mscoff.h $C\mscoffobj.c
$(CC) -c -o$@ $(MFLAGS) -I$D;$(ROOT) -I$G $C\mscoffobj
$G/mscoffobj.obj : $C\mscoff.d $C\mscoffobj.d
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This compiles the 2 files into different object files, but not both are passed to the linker. Simplest to compile them seperately.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One wonders why that suddenly stopped working (and it works on my machine). Sigh.

@WalterBright WalterBright force-pushed the mscoffobj.d branch 2 times, most recently from 5eba524 to 5ac0749 Compare October 28, 2018 10:16
Copy link
Contributor

@thewilsonator thewilsonator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you try to not make unnecessary changes when converting files but it's probably a good idea to address this even if you just comment the test and one of the branches.

rel.r_vaddr = r->offset;
rel.r_symndx = s->Sxtrnnum;
rel.r_vaddr = cast(uint)r.offset;
rel.r_symndx = s.Sxtrnnum;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DScanner complains that this and the above branch are identical. This is the cause of the buildkite failure.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I commented them out.

s->Sclass == SCcomdef ||
s->Sclass == SCcomdat ||
s->Sclass == SCglobal)
if (s.Sclass == SCextern ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

@wilzbach
Copy link
Contributor

Rebased to restart DAutoTest

Copy link
Member

@andralex andralex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onward!

@WalterBright WalterBright merged commit ac875bd into dlang:master Nov 2, 2018
@WalterBright WalterBright deleted the mscoffobj.d branch November 2, 2018 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merge:auto-merge Severity:Refactoring No semantic changes to code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants