Skip to content

"Unsupported ARM implicit relocation 29" on armcc generated object file #295

@Darxoon

Description

@Darxoon

I tried getting objdiff working on my Paper Mario Sticker Star decompilation with a single test translation unit but objdiff is seemingly not able to load the object file armcc generates. (This is also my first time configuring objdiff)

For reference, here is my current objdiff.json:

{
  "$schema": "https://raw.githubusercontent.com/encounter/objdiff/main/config.schema.json",
  "build_target": false,
  "build_base": true,
  "watch_patterns": [
    // ... (same as example config)
  ],
  "ignore_patterns": [
    "build/**/*"
  ],
  "units": [
    {
      "name": "variable_numbers",
      "target_path": "build/orig/variable_numbers.o",
      "base_path": "build/obj/variable_numbers.o",
      "metadata": {}
    }
  ]
}

With this being the relevant parts of makefile:

CXX=wibo ${ARMCC_4_1_BIN}/armcc.exe
CXXFLAGS=--cpp --arm --split_sections --debug --no_debug_macros --gnu \
		--debug_info=line_inlining_extensions -O3 -Otime --data_reorder --signed_chars \
		--multibyte_chars --remove_unneeded_entities --force_new_nothrow --remarks --no_rtti \
		-Iinclude

LD=wibo ${ARMCC_4_1_BIN}/armlink.exe
LDFLAGS=--unresolved=_Z4stubv

DEPS := $(shell find src -name '*.h')

CPPFILES := $(shell find src -name '*.cpp')
OFILES := $(subst src, build/obj, $(CPPFILES:.cpp=.o))

# ...

build/obj/%.o: src/%.cpp $(DEPS)
	@mkdir -p $(@D)
	$(CXX) -c -o $@ $< $(CXXFLAGS)

build/out: $(OFILES)
	@mkdir -p $(@D)
	wibo ${ARMCC_4_1_BIN}/armlink.exe $(LDFLAGS) --output $@ $(OFILES)

# ...

When I open objdiff and look at the one unit defined in objdiff.json, i get this error:

Loading object '/home/ivgy/projects/SS/decomp/leaflitter/build/obj/variable_numbers.o'
Unsupported ARM implicit relocation 29

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions