From commits-return-4257-archive-asf-public=cust-asf.ponee.io@nuttx.apache.org Mon Mar 9 05:38:01 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id D519D180181 for ; Mon, 9 Mar 2020 06:38:00 +0100 (CET) Received: (qmail 30563 invoked by uid 500); 9 Mar 2020 05:38:00 -0000 Mailing-List: contact commits-help@nuttx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nuttx.apache.org Delivered-To: mailing list commits@nuttx.apache.org Received: (qmail 30554 invoked by uid 99); 9 Mar 2020 05:38:00 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Mar 2020 05:38:00 +0000 From: GitBox To: commits@nuttx.apache.org Subject: [GitHub] [incubator-nuttx] yamt commented on a change in pull request #447: ESP32 module support Message-ID: <158373227999.31979.11796483158947488128.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Mon, 09 Mar 2020 05:37:59 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit yamt commented on a change in pull request #447: ESP32 module support URL: https://github.com/apache/incubator-nuttx/pull/447#discussion_r389470548 ########## File path: libs/libc/machine/xtensa/arch_elf.c ########## @@ -154,6 +161,57 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym, uintptr_t addr) { - berr("ERROR: RELA relocation not supported\n"); - return -ENOSYS; + unsigned int relotype; + unsigned char *p; + uint32_t value; + + relotype = ELF32_R_TYPE(rel->r_info); + value = sym->st_value + rel->r_addend; + + /* Handle the relocation by relocation type */ + + switch (relotype) + { + case R_XTENSA_32: + (*(uint32_t *)addr) += value; Review comment: i will fix when i push next time ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services