compiler: sort packages in export data more deterministically

We can have multiple packages with the same name, so also sort by pkgpath.
To avoid an inconsistent sort, sort by symbol and pointer address if
we somehow get two different packages with the same name and pkgpath.

Change-Id: Iaff153bb63e4ff53cc885397068d0820a4ac40b8
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/171032
Reviewed-by: Cherry Zhang <cherryyz@google.com>
1 file changed