Skip to content

goto-cc: also use the linker when processing multiple source files [blocks: #4056] #4297

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

Merged
merged 2 commits into from
Dec 21, 2020

Conversation

tautschnig
Copy link
Collaborator

The linker is able to do some type sanitisation across translation units, and
there is no reason behaviour should be different whether we link previously
compiled object files or a set of source files.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@tautschnig tautschnig requested a review from kroening as a code owner February 28, 2019 11:10
@tautschnig tautschnig self-assigned this Feb 28, 2019
@tautschnig tautschnig changed the title goto-cc: also use the linker when processing multiple source files goto-cc: also use the linker when processing multiple source files [depends-on: #1260] Feb 28, 2019
@tautschnig tautschnig changed the title goto-cc: also use the linker when processing multiple source files [depends-on: #1260] goto-cc: also use the linker when processing multiple source files [depends-on: #1260, blocks: #4056] Feb 28, 2019
@tautschnig tautschnig changed the title goto-cc: also use the linker when processing multiple source files [depends-on: #1260, blocks: #4056] goto-cc: also use the linker when processing multiple source files [blocks: #4056] May 22, 2019
@tautschnig tautschnig assigned kroening and unassigned tautschnig May 22, 2019
@codecov
Copy link

codecov bot commented Nov 7, 2020

Codecov Report

Merging #4297 (adaefcf) into develop (4c2b413) will increase coverage by 0.00%.
The diff coverage is 72.91%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #4297   +/-   ##
========================================
  Coverage    69.45%   69.46%           
========================================
  Files         1243     1243           
  Lines       100620   100626    +6     
========================================
+ Hits         69887    69895    +8     
+ Misses       30733    30731    -2     
Flag Coverage Δ
cproversmt2 43.13% <ø> (ø)
regression 66.35% <72.91%> (+<0.01%) ⬆️
unit 32.28% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/goto-cc/gcc_mode.cpp 68.96% <0.00%> (-0.20%) ⬇️
src/goto-cc/ld_mode.cpp 55.22% <0.00%> (+0.81%) ⬆️
src/goto-cc/ld_mode.h 100.00% <ø> (ø)
src/goto-cc/linker_script_merge.cpp 0.00% <0.00%> (ø)
src/goto-cc/linker_script_merge.h 0.00% <ø> (ø)
src/goto-cc/compile.cpp 70.19% <90.90%> (+1.54%) ⬆️
src/goto-cc/compile.h 100.00% <100.00%> (ø)
src/util/symbol_table.h 95.65% <0.00%> (-4.35%) ⬇️
src/goto-programs/goto_model.h 64.51% <0.00%> (-2.16%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c2b413...adaefcf. Read the comment docs.

Copy link
Collaborator

@martin-cs martin-cs left a comment

Choose a reason for hiding this comment

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

Seems reasonable but I am a little concerned that there aren't any tests for this. Is there any user-visible change of this PR?

@tautschnig
Copy link
Collaborator Author

Seems reasonable but I am a little concerned that there aren't any tests for this. Is there any user-visible change of this PR?

There shouldn't be user-visible changes, actually. Testing exists (regression/ansi-c/linking1/), but I wouldn't claim any degree of completeness.

@martin-cs
Copy link
Collaborator

@tautschnig OK; thanks.

@kroening kroening assigned tautschnig and unassigned kroening Dec 18, 2020
@tautschnig tautschnig force-pushed the linking-fix-2 branch 3 times, most recently from 7ebc1de to 7f74490 Compare December 20, 2020 22:19
There is no need to access the goto model stored in compilet as we read
the goto binary that compilet wrote anyway. This avoids tight coupling
and enables removing public class members from compilet.
The linker is able to do some type sanitisation across translation units, and
there is no reason behaviour should be different whether we link previously
compiled object files or a set of source files.
@tautschnig tautschnig merged commit 21d3ee8 into diffblue:develop Dec 21, 2020
@tautschnig tautschnig deleted the linking-fix-2 branch December 21, 2020 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants