Skip to content

cmd/8l: unsupported scattered relocation 2/1 on Mac OS X #1635

@gopherbot

Description

@gopherbot

by ian.burleigh:

cgo: Cannot take the address of a C function on darwin/386.

void scatter() {
  void *p = scatter;
  printf("scatter %x\n",(unsigned int)p);
}

What steps will reproduce the problem?
1. Unpack attached zip archive.
2. make foo

What is the expected output?
compiled

What do you see instead?
8l: malformed mach-o file: unsupported scattered relocation 2/1

Which compiler are you using (5g, 6g, 8g, gccgo)?
gcc version 4.2.1 (Apple Inc. build 5664)
8g version 7835+
8l version 7835+

Which operating system are you using?
Snow Leopard

Which revision are you using?  (hg identify)
cee1ff73db73+ tip

Please provide any additional information below.
All works well on linux or darwin/amd64.

Attachments:

  1. cgo_foo.zip (1947 bytes)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions