From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id /NWKG8daz2D/IgAAWB0awg (envelope-from ) for ; Sun, 20 Jun 2021 11:12:07 -0400 Received: by simark.ca (Postfix, from userid 112) id 603301F1F2; Sun, 20 Jun 2021 11:12:07 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 52B281F1EE for ; Sun, 20 Jun 2021 11:12:06 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AC501385380A for ; Sun, 20 Jun 2021 15:12:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC501385380A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1624201925; bh=t72zWSTjQH00V0xkzOPnHyzPxZTY2yTuOPcA44zHy0Y=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=qLxgDozH1B4tJimKp+aB9JkrU/TAY5Uc0n2vq8UqlAvGCIvS1+t2fR3UyI4MhtT9O IsoC50+rHzo4Vc8mmz1MWnH3UXSVEbP0NOTOpus4iRvau3PX0VNr7Xd2Lz3A0QFFlc /3idiCSyHYkY5z3KHX6bl5DvmP4uI/XM9xOUDwb0= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 6B2953858034 for ; Sun, 20 Jun 2021 15:11:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6B2953858034 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 15KFBUmr025218 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 20 Jun 2021 11:11:35 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 15KFBUmr025218 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 243431F1EE; Sun, 20 Jun 2021 11:11:30 -0400 (EDT) Subject: Re: [PATCH 1/3] sim: split sim/callback.h include out To: Mike Frysinger , gdb-patches@sourceware.org References: <20210616063302.20722-1-vapier@gentoo.org> Message-ID: Date: Sun, 20 Jun 2021 11:11:29 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210616063302.20722-1-vapier@gentoo.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Sun, 20 Jun 2021 15:11:30 +0000 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2021-06-16 2:33 a.m., Mike Frysinger via Gdb-patches wrote: > The sim-basics.h is too big and includes too many things. This leads > to some arch's sim-main.h having circular loop issues with defs, and > makes it hard to separate out common objects from arch-specific defs. > By splitting up sim-basics.h and killing off sim-main.h, it'll make > it easier to separate out the two. > > Start with splitting out sim/callback.h. Starting with this patch (according to bisect), I get this link error: make[3]: Entering directory '/home/simark/build/binutils-gdb/sim/erc32' ccache gcc -DHAVE_CONFIG_H -DWITH_HW=1 -DHAVE_DV_SOCKSER -DDEFAULT_INLINE=0 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type -Wold-style-declaration -I. -I/home/simark/src/binutils-gdb/sim/erc32 -I../common -I/home/simark/src/binutils-gdb/sim/erc32/../common -I../../include -I/home/simark/src/binutils-gdb/sim/erc32/../../include -I../../bfd -I/home/simark/src/binutils-gdb/sim/erc32/../../bfd -I../../opcodes -I/home/simark/src/binutils-gdb/sim/erc32/../../opcodes -I../.. -I/home/simark/src/binutils-gdb/sim/erc32/../../gnulib/import -I../../gnulib/import -DFAST_UART -I/home/simark/src/binutils-gdb/sim/erc32/../.. -g3 -O0 -fsanitize=address -fmax-errors=1 -fdiagnostics-color=always -o sis \ sis.o exec.o erc32.o func.o help.o float.o ../common/common_libcommon_a-portability.o ../common/common_libcommon_a-sim-load.o ../common/common_libcommon_a-version.o ../../bfd/libbfd.a ../../opcodes/libopcodes.a ../../libiberty/libiberty.a -lm -ltinfo -ldl -lnsl -lz -lreadline -ltinfo -lm ../../gnulib/import/libgnu.a /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: warning: relocation against `current_target_byte_order' in read-only section `.text' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `LSEXTRACTED': /home/simark/src/binutils-gdb/sim/common/sim-bits.c:64: undefined reference to `sim_io_error' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `MSEXTRACTED': /home/simark/src/binutils-gdb/sim/common/sim-bits.c:99: undefined reference to `sim_io_error' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `LSINSERTED': /home/simark/src/binutils-gdb/sim/common/sim-bits.c:134: undefined reference to `sim_io_error' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `MSINSERTED': /home/simark/src/binutils-gdb/sim/common/sim-bits.c:170: undefined reference to `sim_io_error' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `LSSEXT': /home/simark/src/binutils-gdb/sim/common/sim-bits.c:207: undefined reference to `sim_io_error' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o:/home/simark/src/binutils-gdb/sim/common/sim-bits.c:234: more undefined references to `sim_io_error' follow /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `endian_t2h_1': /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:47: undefined reference to `current_target_byte_order' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:47: undefined reference to `current_target_byte_order' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `endian_h2t_1': /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:61: undefined reference to `current_target_byte_order' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:61: undefined reference to `current_target_byte_order' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `offset_1': /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:145: undefined reference to `sim_io_error' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:146: undefined reference to `sim_io_error' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:147: undefined reference to `sim_io_error' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `endian_t2h_2': /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:47: undefined reference to `current_target_byte_order' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:47: undefined reference to `current_target_byte_order' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `endian_h2t_2': /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:61: undefined reference to `current_target_byte_order' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:61: undefined reference to `current_target_byte_order' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `offset_2': /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:145: undefined reference to `sim_io_error' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:146: undefined reference to `sim_io_error' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:147: undefined reference to `sim_io_error' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `endian_t2h_4': /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:47: undefined reference to `current_target_byte_order' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:47: undefined reference to `current_target_byte_order' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `endian_h2t_4': /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:61: undefined reference to `current_target_byte_order' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:61: undefined reference to `current_target_byte_order' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `offset_4': /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:145: undefined reference to `sim_io_error' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:146: undefined reference to `sim_io_error' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:147: undefined reference to `sim_io_error' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `endian_t2h_8': /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:47: undefined reference to `current_target_byte_order' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:47: undefined reference to `current_target_byte_order' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `endian_h2t_8': /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:61: undefined reference to `current_target_byte_order' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:61: undefined reference to `current_target_byte_order' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `offset_8': /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:145: undefined reference to `sim_io_error' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:146: undefined reference to `sim_io_error' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:147: undefined reference to `sim_io_error' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `endian_t2h_16': /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:47: undefined reference to `current_target_byte_order' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:47: undefined reference to `current_target_byte_order' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `endian_h2t_16': /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:61: undefined reference to `current_target_byte_order' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:61: undefined reference to `current_target_byte_order' /usr/bin/ld: ../common/common_libcommon_a-sim-load.o: in function `offset_16': /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:145: undefined reference to `sim_io_error' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:146: undefined reference to `sim_io_error' /usr/bin/ld: /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:147: undefined reference to `sim_io_error' /usr/bin/ld: warning: creating DT_TEXTREL in a PIE collect2: error: ld returned 1 exit status Simon