<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>
<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>
<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">
<p style="color: #777777;">
<a href="https://gitlab.com/asosedkin">Alexander Sosedkin</a>
<a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1862#note_2045691449">commented</a>:
</p>
<div class="md" style="position: relative; z-index: 1; color: #28272d; word-wrap: break-word;">
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">The change confuses me.</p>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">I know that linking order matters, but this change goes against my understanding of how it works. I thought that the linker does a left-to-right pass maintaining a list of used-but-not-unresolved symbols and bails out at the end if there are any of them left; so it first needs to know learn there's a demand for a symbol, then resolve it, not the other way around.</p>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">Can't back that with a decent quote though, the best I've found in 5 minutes is this excerpt from <a href="https://gcc.gnu.org/onlinedocs/gcc/gcc-command-options/options-for-linking.html" rel="nofollow noreferrer noopener" target="_blank" style="margin-top: 0;">GCC docs</a>:</p>
<blockquote dir="auto" style="font-size: inherit; color: #4c4b51; padding-top: .5rem; padding-bottom: .5rem; padding-left: 1.5rem; --tw-shadow: inset 4px 0 0 0 var(--gray-100, #dcdcde); --tw-shadow-colored: inset 4px 0 0 0 var(--tw-shadow-color); box-shadow: 0 0 #0000, 0 0 #0000, var(--tw-shadow); border-top-width: 0; border-bottom-width: 0; border-right-width: 0; margin: .5rem 0 0;" align="initial">
<p style="color: inherit; line-height: 1.5; margin: 0;">the linker searches and processes libraries and object files in the order they are specified. Thus, foo.o -lz bar.o searches library z after file foo.o but before bar.o. If bar.o refers to functions in z, those functions may not be loaded.</p>
</blockquote>
</div>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #737278;">
—
<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1862#note_2045691449">view it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.com">gitlab.com</a>. <a href="https://gitlab.com/-/sent_notifications/6fbb6bbebddc7769b47dfe3d5c833d39/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.com/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.com/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.com/gnutls/gnutls/-/merge_requests/1862#note_2045691449"}}</script>
</p>
</div>
</body>
</html>