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

cmd/link: handle repeated "unresolved inter-package jump" errors #25753

Closed
quasilyte opened this issue Jun 6, 2018 · 7 comments

Comments

Projects
None yet
6 participants
@quasilyte
Copy link
Contributor

commented Jun 6, 2018

CL113955 fixes duplicated "unresolved symbol" messages, but for architectures with trampoline support we also have "unresolved inter-package jump" errors (they are also repeated).

This caused some builders to break due to failing TestUndefinedRelocErrors test.

Given program used in test:

package main

func undefined()

func defined1() int {
	// To check multiple errors for a single symbol,
	// reference undefined more than once.
	undefined()
	undefined()
	return 0
}

func defined2() {
	undefined()
	undefined()
}

func init() {
	_ = defined1()
	defined2()
}

// The "main" function remains undeclared.

With pre-updated linker we get and GOARCH=ppc64:

main.defined1: unresolved inter-package jump to main.undefined()
main.defined1: unresolved inter-package jump to main.undefined()
main.defined2: unresolved inter-package jump to main.undefined()
main.defined2: unresolved inter-package jump to main.undefined()
main.defined1: relocation target main.undefined not defined
main.defined1: relocation target main.undefined not defined
main.defined2: relocation target main.undefined not defined
main.defined2: relocation target main.undefined not defined
runtime.main_main·f: relocation target main.main not defined
main.defined1: undefined: "main.undefined"
main.defined1: undefined: "main.undefined"
main.defined2: undefined: "main.undefined"
main.defined2: undefined: "main.undefined"
runtime.main_main·f: undefined: "main.main"

With CL mentioned above we get less errors, but some unexpected and duplicated errors remain:

main.defined1: unresolved inter-package jump to main.undefined()
main.defined1: unresolved inter-package jump to main.undefined()
main.defined2: unresolved inter-package jump to main.undefined()
main.defined2: unresolved inter-package jump to main.undefined()

Leading to failure:

--- FAIL: TestUndefinedRelocErrors (0.21s)
    ld_test.go:68: unexpected error: main.defined2: unresolved inter-package jump to main.undefined() (x2)
    ld_test.go:68: unexpected error: main.defined1: unresolved inter-package jump to main.undefined() (x2)
@quasilyte

This comment has been minimized.

Copy link
Contributor Author

commented Jun 6, 2018

I'll send a fix today.

@gopherbot

This comment has been minimized.

Copy link

commented Jun 6, 2018

Change https://golang.org/cl/116676 mentions this issue: cmd/link: fix duplicated "unresolved inter-package jump" errors

@jcajka

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2018

For the record observed on pp64le/armv7hl Fedora and Epel/RHEL/Centos 7 where it breaks build of the GC as all test passing is expected.

--- FAIL: TestUndefinedRelocErrors (0.22s)
    ld_test.go:68: unexpected error: main.defined2: unresolved inter-package jump to main.undefined() (x2)
    ld_test.go:68: unexpected error: main.defined1: unresolved inter-package jump to main.undefined() (x2)
FAIL
FAIL	cmd/link/internal/ld	26.581s

CL116676 seems to resolve this issue for me.

@laboger

This comment has been minimized.

Copy link
Contributor

commented Jun 8, 2018

This resolves the issue, can we get this fix in?

@quasilyte

This comment has been minimized.

Copy link
Contributor Author

commented Jun 8, 2018

@laboger, sorry for the inconvenience.

If anyone familiar with Go linker can help Ian doing a review, maybe we can get this faster.
Thanks.

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jun 8, 2018

@quasilyte I'm waiting for an updated change on https://golang.org/cl/116676. You replied to my comments but you didn't upload any fixes. Or did I miss something?

@quasilyte

This comment has been minimized.

Copy link
Contributor Author

commented Jun 8, 2018

My mistake. Updated patch set was not sent. :(
Mailed it just now.

@gopherbot gopherbot closed this in 289ab30 Jun 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.